Suppose I have two Python files:
abc.py:
from .config import *
update_a()
print_a() # prints 5
print(a) # prints 2 rather than 5 even after calling update_a() and using global in update_a()
config.py:
a = 2
def update_a():
global a
a = 5
def print_a():
global a
print(a) # prints 5
The global variable in config.py does not seem to have the updated value when accessed from abc.py.