Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Python Scope

def myfunc():
  x = 200
  print(x)

myfunc() #works
#print(x) does not work
#as a rule, you can use a variable more "outside" than you but you cannot use a variable more "inside". 
Source by www.codecademy.com #
 
PREVIOUS NEXT
Tagged: #Python #Scope
ADD COMMENT
Topic
Name
7+9 =