global and nested error

This commit is contained in:
Mert Gör 🇹🇷 2023-06-04 07:25:30 +03:00
parent 25e46a745c
commit 2f78653501
No known key found for this signature in database
GPG Key ID: 2100A876D55B39B9
2 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,8 @@
bar = 10
def foo():
#print(bar) # error!
bar = 20
print(bar)
foo()

View File

@ -0,0 +1,8 @@
bar = 10
def foo():
print(bar) # error!
bar = 20
print(bar)
foo()