0
How to create global variables?
1 Resposta
0
inside a function with the statement: global nameofyourvariable;
def function ():
global var; # this will asign a new value to var if already exists.
var2 # (var2 is only for using in this function)
...
otherwise with the same indent of your defs (and remember, before using it ....
else:
Error!!! variable is not defined :-) :-) :-) !).