Unconditional control statement in Python

  • The Unconditional control statement is way to control the statement without using direct conditions.
  • There are two types :
    • break
    • continue


  • The break statement is used to terminate loops or exit the loops.
  • It is necessary to exit immediately from a loop as soon as the condition is satified.
  • The statements after break statement are skipped.
while condition:
Example of break


  • Sometime , it is required to skip a part of a body of loop under specific conditions.
  • The working structure of continue is similar as that of that the break statement but difference is that it cannot terminate the loop.
  • It causes the loop to be continued with next iteration after skipping statements in between.
  • Continue statement simply skips statements and continues next iteration.
while condition:
 if condition:
Example of Continue in python