Lets say I have these 3 (tiny) python files -
a.py
myvar = 'a'
b.py
import a
import c
myvar = 'b'
c.pr()
c.py
from a import myvar
def pr():
print myvar
Now if I execute b.py I get output
a
But I really want output to be as
b
So please tell me how can I restructure/modify the programs so that the module-wide myvar can be assigned a different value.