Next is a statement allowed within a loop that causes the current iteration of the loop to be terminated and cycles the loop to the beginning of its next iteration.

 

A next statement includes—in this order—the reserved word "next", an optional loop label (which must be the same as the label of the loop in which the next statement occurs), and, optionally, the reserved word "when" followed by a condition which, when True, causes the "next" statement to be executed.

 

If a "when" clause is not included, a "next" statement is executed as soon as it is encountered.

 

LRM

    8.9

 

See also

image\diamond.gif  Loop.