Scoping Ex.1

Run Settings
LanguagePython
Language Version
Run Command
x=1 y=2 def a(): global x z=1 def inner(): nonlocal z z=z+1 #z is closure x=z+1 print (x) print (z) x=y+1 return inner def b(): global x c = a() y=1 x=x+2 c() outer_func = a() outer_func() outer_func() b()
Editor Settings
Theme
Key bindings
Full width
Lines