I have a simple code like this:
temp = 100
def my_fun():
temp += 10
return temp
After I call this function my_fun()
I get an error
local variable 'temp' referenced before assignment
What's wrong with my code? I set temp
before I call it. But still an error.
Thanks to all.