title: Python 2.7 Quitting
body: <p>I've added in this function which makes sure the user actually wants to quit the program. It works when you actually want to quit but if you want to return to the program it just loops the statement:</p>
  
  <pre><code>def WantToQuit():
      Quit = raw_input("Please enter y if you are sure you want to quit, if not press n to return ")
      if Quit == 'y':
          print ('')
      elif Quit == 'n':
          DisplayMenu()
          return WantToQuit()
  </code></pre>
  
  <p>Elsewhere:</p>
  
  <pre><code>elif Choice == 'q':
      WantToQuit()
      raw_input('Press enter key to continue ')
  </code></pre>