global scope 2
This commit is contained in:
parent
6f29fec05e
commit
d922943f57
9
python-temel/global.scope.2.py
Normal file
9
python-temel/global.scope.2.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
x = 10
|
||||
|
||||
def foo():
|
||||
#print(x)
|
||||
#global x # error
|
||||
x = 20
|
||||
print(x)
|
||||
|
||||
foo()
|
Loading…
Reference in New Issue
Block a user