python中一些Json处理小技巧–python3.9 如何在函数内部改变全局变量值 一、方法一:使用global 未使用global: a = 1 def fn(a): # global a a = a + 1 return a b = fn(a) print(a, b