Categories
How to change a variable globally, in all files, python?
Let's say I import a variable from file2 into file1 And change the value of the variable in file1 How can I make this variable change in file2 too? from file2 import x x+=1
from file2 import x
x+=1
Answer the question
In order to leave comments, you need to log in
global
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question