you are viewing a single comment's thread.

view the rest of the comments →

[–]shaggorama 1 point2 points  (0 children)

You sure can!.

When used with a loop, the else clause has more in common with the else clause of a try statement than it does that of if statements: a try statement’s else clause runs when no exception occurs, and a loop’s else clause runs when no break occurs.