| Python Reference Manual |
break_stmt | ::= | "break" |
break may only occur syntactically nested in afororwhile loop, but not nested in a function or class definitionwithin that loop.
It terminates the nearest enclosing loop, skipping the optionalelse clause if the loop has one.
If afor loop is terminated bybreak, the loop controltarget keeps its current value.
Whenbreak passes control out of atry statementwith afinally clause, thatfinally clause is executedbefore really leaving the loop.
| Python Reference Manual |