In Python, we have 3 loop control statements : break, continue and pass.
When the condition satisfies, the loop breaks and comes out of the loop.
1 2 3 4 5 6 7 |
|
When the condition satisfies, it is skipped and moves on to next iteration in the loop.
1 2 3 4 5 6 |
|
1 2 3 4 5 6 |
|
It does nothing. It acts as a placeholder.
1 2 3 4 5 6 |
|
The above is the detailed content of Loop Control statements in Python : break, continue, pass. For more information, please follow other related articles on the PHP Chinese website!