title: Break out of while True loop with function
body: <p>So I have a while true loop -</p>
  
  <pre><code>while True:
    getStatus()
    print('Ended')
  </code></pre>
  
  <p>I hope to be able to break out of it if answer is 999. this is what I tried:</p>
  
  <pre><code>def getStatus():
    answer = input('What is the box ID? ')
    if answer == 999:
      return False 
    elif type(answer) == int:
      boxId = answer + 1
      print(boxId)
  </code></pre>
  
  <p>However even when the input is '999' it loops back and asks 'What is the box ID? ' again. </p>
  
  <p>How do I get out of the while true loop?</p>