python module variable confusion
Here is my code :
a module settings.py:
My_KEY = ""
and I am using this MY_KEY in another module
my_module.py
from settings import My_KEY
def function_a():
MY_KEY = "abcd"
def function_b():
function_a();
print My_KEY
I expect to see a "abcd" in output when I call function_b(), but how come
I get empty string. I am totally lost
No comments:
Post a Comment