How to break a Python while loop from a function within the loop
<pre><code>while True:
    input = raw_input("enter input: ")
    result = useInput(input)

def useInput(input):
    if input == "exit":
        break   #return 0 / quit / etc.. i want to break the while loop from within this function
</code></pre>

<p>I know I can put the "if logic" directly in the while loop, but I want it to be in the function.  Is there a way to break a while loop from within a function called in the loop?</p>
