摘要: 1 i = 0 2 def global_test(): 3 i+= 1 4 print(i) 5 global_test() 报错 UnboundLocalError: local variable 'i' referenced before assignment 分析:global关键字用来在函 阅读全文
posted @ 2021-07-15 17:36 jiyanjiao 阅读(1224) 评论(0) 推荐(0) 编辑