Loop Control Statements in Python

PythonServer Side ProgrammingProgramming

Loop control statements change execution from its normal sequence. When execution leaves a scope, all automatic objects that were created in that scope are destroyed.

Python supports the following control statements. Click the following links to check their detail.

Let us go through the loop control statements briefly

Sr.NoOperator & Description
1break statement
Terminates the loop statement and transfers execution to the statement immediately following the loop.
2continue statement
Causes the loop to skip the remainder of its body and immediately retest its condition prior to reiterating.
3pass statement
The pass statement in Python is used when a statement is required syntactically but you do not want any command or code to execute.
raja
Published on 24-Jan-2020 12:04:27
Advertisements