In Python, we can change the flow of a loop using the control statements:

  • continue
  • break
  • pass

continue

The continue statement stops the current iteration and goes to the next.

break

The break statement breaks out of the innermost enclosing for or while loop.

pass

The pass statement does nothing, and is essentially a null statement. For example, it can be used in an if statement to skip the current iteration. It can also be used as a placeholder for future code.