title: Breaking out of infinite loop
body: <p>My code is not allowing me to break out of the infinite loop, and therefore exit the program. Here is my code:</p>
  
  <pre><code>while True:
          print("\n1. Surname\n2. D.O.B\n3. Quit")
          try:
              select = int(input("Please select an option: "))
              if select == 1:
                  surnameSearch()
              elif select == 2:
                  DOB_search(BkRdr)
              elif search == 3:
                  break
          except:
              print("That was an incorrect option, please try again:")
  </code></pre>
  
  <p>Here is what the input/output looks like:</p>
  
  <pre><code>1. Surname
  2. D.O.B
  3. Quit
  Please select an option: 3
  That was an incorrect option, please try agan:
  
  1. Surname
  2. D.O.B
  3. Quit
  Please select an option: 
  </code></pre>