def fu():
a=10
def zi(x):
nonlocal a
a=20
return 2*x+1
print(zi(5),a)
fu()
#直接调用会报错
#zi(5)