如何在一个function里面设置一个全局的变量?

  • 答:解决方法是在function的开始插入一个global声明:
def f()

global x
原文地址:https://www.cnblogs.com/sea-stream/p/11187039.html