backlinks to this page:
Python has a
global statement to make a variable global, see also scope of variables
not to be confused with:
globals()- shows all global variables of the current module
To avoid the use of global reasons why not to use global you can either:
__init__function. All class variables can be accessed and modified from outside the class as well as from inside the class.
config.py) and import this module in all your modules. Put your variable declarations inside this module. You can access and change the values from other modules