first.py:
from third import *
from second import *
while running:
off()
second.py:
from third import *
def off():
running = False
third.py:
running = True
The program still running and running variable is not accessed.
I want to calling a function which is in another file, the function change the boolean which is in another file. I know I can just type everything to the first file but I want separate files for functions and variables.
I expect to close the program after running.
I tried using global variables. I read all similar questions.