title: Python function global variables?
body: <p>I know I should avoid using global variables in the first place due to confusion like this, but if I were to use them, is the following a valid way to go about using them? (I am trying to call the global copy of a variable created in a separate function.)</p>
  
  <pre><code>x = "somevalue"
  
  def func_A ():
     global x
     # Do things to x
     return x
  
  def func_B():
     x = func_A()
     # Do things
     return x
  
  func_A()
  func_B()
  </code></pre>
  
  <p>Does the <code>x</code> that the second function uses have the same value of the global copy of <code>x</code> that <code>func_a</code> uses and modifies? When calling the functions after definition, does order matter?</p>