2019-09-19 Python 3错误UnboundLocalError: local variable referenced before assignment

这个错误是没有定义全局变量,定义一下全局变量即可。

参考

  • function - Python 3: UnboundLocalError: local variable referenced before assignment - Stack Overflow
  • function - Python 3: UnboundLocalError: local variable referenced before assignment - Stack Overflow

你可能感兴趣的:(2019-09-19 Python 3错误UnboundLocalError: local variable referenced before assignment)