Control Statements


Control Statements 

  • Control statements in python are used to control the order of execution of the program based on the values and logic.

Types of Control Statements:-

  • Continue

  • Break

  • Pass

1. Continue Statement

  • The continue statement rejects all the remaining statements in the current iteration of the loop and moves the control back to the top of the loop. 

  • The continue statement can be used in both while and for loops.


2. Break Statement

  • The break statement is used to terminate the loop containing it, the control of the program will come out of that loop.

3. Pass Statement

  • Pass statement is python is a null operation, which is used when the statement is required syntactically.






Post a Comment

Post a Comment (0)