when to use global? anyone mind to give examples :))
Post a Reply
|Oldest Newest Rating|
· September 22, 2015
global variables can be used OUTSIDE of functions, while local variables can only be used INSIDE the function it's already in.
By default, a variable is global if not made in a functioin
however if the variable is made inside a function, it's local (meaning it can only be used inside the function)
· September 24, 2015
#example2.py <will return error>
This section is all about snakes! Just kidding.
|Bucky Roberts Administrator|