demo_ref_keyword_nonlocal2.py:
def myfunc1(): x = "John" def myfunc2(): x = "hello" myfunc2() return x print(myfunc1())
C:\Users\My Name>python demo_keyword_nonlocal2.py
John