Python global 关键字 ... 创建函数: def myfunction(): global x x = "hello" # 执行函数: ... global 关键字用于从非全局范围创建全局变量,例如在函数内部。
確定! 回上一頁