The break statement

break

break_stmt:     "break"

break may only occur syntactically nested in a for or while loop, but not nested in a function or class definition within that loop. for while loopstatement

It terminates the nearest enclosing loop, skipping the optional else clause if the loop has one. else

If a for loop is terminated by break, the loop control target keeps its current value. loop controltarget

When break passes control out of a try statement with a finally clause, that finally clause is executed before really leaving the loop. finally