how to exit out of a while loop in python code example Example: python exit while loop while (True): # ... break