全局变量 设全局变量,可在函数中被修改,并在另外一个函数中使用 a=0 def changea(): global a a = 2 print(a)#结果为2 学习来源:https://blog.csdn.net/weixin_34006468/article/details/94712859