hello
I wrote a minimum working example showing what I am unable to achieve:
I have a variable in
one.py
desired output:
I wrote a minimum working example showing what I am unable to achieve:
I have a variable in
one.py
called foo
, i would like to change it's value and then use the new value accross all modulesone.py
import two foo = 'a' def main(): two.change_foo() print(foo) if __name__ == "__main__": main()two.py
import one def change_foo(): print(one.foo) one.foo = 'b' print(one.foo)output:
Quote:Reloaded modules: two, one
a
b
a
desired output:
Quote:a
b
b