Python local variable ‘x2‘ referenced before assignment

阅读 79

2022-01-12

出现这种报错,是因为局部变量。需要改成全局变量。

 

 

添加 global x2 即可

相关推荐

精彩评论(0)

0 0 举报