How can you exit a loop prematurely in Python?

  • break
  • exit
  • stop
  • terminate

In Python, you can exit a loop prematurely using the break statement. When break is encountered within a loop, it immediately terminates the loop and continues with the next code after the loop.

Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *