title: Use and set global variables across multiple files in Python
body: <p>I have three files. In the first one, I define the global variable.</p>
  
  <pre><code># file1.py
  ABC = 111
  </code></pre>
  
  <p>In the second file, I change the content of the global variable.</p>
  
  <pre><code># file2.py
  from file1 import *
  
  def set_value():
      global ABC
      ABC = 222
  </code></pre>
  
  <p>In the third file, I try to use set_value() defined in file2.py to change the contect of the global variable and print it.</p>
  
  <pre><code># file3.py
  
  from file1 import *
  from file2 import *
  
  set_value()
  print ABC
  </code></pre>
  
  <p>The result is 111 not 222. The new value is not set in the global variable. How can I set the global value in file1.py using function in file2.py ?  </p>