I have three python files:
a.py
theVariable = "Hello!"
b.py
import a
a.theVariable = "Change"
c.py
import a
while True:
print(a.theVariable)
I want c.py to print out "Change" instead of "Hello!". How can I do this and why wont this work? There needs to be separate files because b.py would be running a Tkinter gui.
ccannot print out "change" without importing and running the code inb, but even then, you're importingatwice, and not sharing the state of that variable - OneCricketeer