Python - Loop Control
Code Life
By Pierre Marsaa
Loop Control Introduction
Sometimes we need more control over our loops. Python provides two special statements for this purpose: break and continue.
These statements let you change the normal flow of a loop:
- break: Exits the loop completely
- continue: Skips the current iteration and moves to the next one
Loop control statements help you make your loops more efficient and solve problems in different ways.
Verify