如何在函数内部改变全局变量?
class main:
num = 10
def change_num(self):
global num#可以改变全局变量
num = 100
Copyright © 广州京杭网络科技有限公司 2005-2025 版权所有 粤ICP备16019765号