title: Trying to place GLOBAL in the right place within Python
body: <p>Keep getting a syntax error, trying to understand where and how GLOBAL works within a Python function. </p>
  
  <pre><code>import os
  
  path = "start"
  route = "1"
  
  def pathcontrol(route, path):
      global path
          while  path=="start":
              if route == "1":
                  path = "one"
              elif route == "2":
                  path = "two"
              else:
                  return
  
  
  pathcontrol(route, path)
  print("Exit Path = "+path)
  
  exit=input("Press enter to exit ")
  </code></pre>
  
  <p>The idea is to add an input() for 'route' as well so the user can choose 1 or 2, but I know how to manage that. </p>
  
  <p>Thanks, 
  :-)</p>