0
Why does the third part of this code don't work?
4 Respuestas
+ 2
If you want to modify a variable var inside the function you need either to use a local variable, or to use a global var statement. Since you modify var3 python assumes it is local, and not the global var3. And it cant print it.
0
Error message says it all:
local variable 'var3' referenced before assignment
Switch lines 34 and 35.
0
Yes, I know it, but why I can't reference it? (the other two codes are similar)
0
Thanks!