demo_scope2.py:
def myfunc(): x = 300 def myinnerfunc(): print(x) myinnerfunc() myfunc()
C:\Users\My Name>python demo_scope2.py
300