1 def mytest1(): 2 b = 4 3 4 def mytest2(): 5 nonlocal b 6 b = 8 7 print(b, id(b)) 8 9 mytest2() 10 print(b, id(b)) 11 12 13 mytest1()