3 ms·
The way I remember it is that it makes sense in loops that search for something in an iterable. Such loops break when they're successful, and so it makes sense
by fyi1183 8y ago
The way I remember it is that it makes sense in loops that search for something in an iterable. Such loops break when they're successful, and so it makes sense for the code in the else clause to run when the loop was unsuccessful.