Knowing when to stop or skip a loop in Python
In our last article we saw how we can efficiently repeat processes with for and while loops.
But what if we do not want our loop going all the way? How can we tell Python to stop a loop early or skip a single iteration, without ending the entire program?
The break statement
Loops are important, but sometimes we do not want every iteration to execute. This is where the break statement is helpful.











