c = 1 def func1(): c = 2 def func2(): c = 3 print(c) func2() func1()
依次注释 c=3, c=2, c=1,会得到
3 2 1
就近原则,既然家里有,就不用去隔壁家