源代码
def myfunc1(): x = "Bill" def myfunc2(): nonlocal x x = "hello" myfunc2() return x print(myfunc1())
运行结果