a = 2 def wrapper(): a += 1 print(a) wrapper()
局部变量不能修改全局变量
local variable 'a' referenced before assignment
原文:https://www.cnblogs.com/cbbxxgc/p/12865351.html