Possible Duplicate:
Using global variables in a function other than the one that created them
I'm using functions so that my program won't be a mess but I don't know how to make a local variable into global.
Which is the correct use of global variables in Python 3?:
1) Stating global VAR_NAME once in the core script (not within a function) and then simply referring to the variable as VAR_NAME everywhere else
2) Stating global VAR_NAME once …
Set_up: I have a .py file for each function I need to use in a program.
In this program, I need to call the function from the external files.
I've tried:
from file.py import function(a,b)
But …