I have two .py files, one is Setting.py and one is main.py.
In the Setting.py file I have the following code:
a= 2
def foo(a):
return a+2
In the main file I have this:
import Setting
if __name__ == '__main__':
X = foo(a)
So, when I run the main file, I get the error that a is not defined. So, I dont want again to define a in the main file. Could you please help me with this? this is a minimal code of my main code. I have multiple .py files and parameters. Thanks