Which of the following best describes the difference between break and continue in Python loops?

  • 'break' and 'continue' are functionally equivalent.
  • 'break' and 'continue' are used for the same purpose.
  • 'break' continues the loop, 'continue' ends the loop entirely.
  • 'break' ends the loop entirely, 'continue' skips the current iteration and continues with the next.
In Python, the 'break' statement is used to exit the current loop entirely, while 'continue' skips the current iteration and proceeds to the next iteration.
Add your answer
Loading...

Leave a comment

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