global scope 2

This commit is contained in:
Mert Gör ☭ 2023-05-30 16:33:46 +03:00
parent 6f29fec05e
commit d922943f57
No known key found for this signature in database
GPG Key ID: 2100A876D55B39B9
1 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,9 @@
x = 10
def foo():
#print(x)
#global x # error
x = 20
print(x)
foo()