UnboundLocalError: local variable 't' referenced before assignment | Already Defined

前端 未结 1 1222
既然无缘
既然无缘 2021-01-29 11:01

I\'m getting the error: UnboundLocalError: local variable \'t\' referenced before assignment When I\'m performing the equation t = t + tc in a function

1条回答
  •  粉色の甜心
    2021-01-29 11:34

    global works per function - so you have to mark the variable as global on every function you use it.

    0 讨论(0)
提交回复
热议问题