title: Using returned variable in python
body: <p>Why doesn't the following allow me to use the <code>os</code> variable once it's returned by the function? The <code>os</code> module isn't being imported so that shouldn't be an issue at all. When I call the <code>Begin()</code> function and print the <code>os</code> variable after the function is finished, python says the variable is not defined.</p>
  
  <pre><code>def Begin():
      os = raw_input("Choose your operating system:\n[1] Ubuntu\n[2] CentOS\nEnter '1' or     '2': ")
      if os != '1' and os != '2':
          print "Incorrect operating system choice, shutting down..."
          time.sleep(3)
          exit()
      else:
          return os
  
  Begin()
  print os
  </code></pre>