示例
x = 0
def grandpa():
x=1
def dad():
x=2
def son():
x=3
print(x)
son()
dad()
grandpa()
输出结果
3
转载于:https://blog.51cto.com/daring/1887064
示例
x = 0
def grandpa():
x=1
def dad():
x=2
def son():
x=3
print(x)
son()
dad()
grandpa()
输出结果
3
转载于:https://blog.51cto.com/daring/1887064