O'Reilly logo
  • Sri Harsha V thinks this is interesting:

The else clause in a while or for loop will be run once as the loop is exiting, if the loop exits normally (without running into a break statement). A break exits the loop immediately, skipping the else part on the way out (if there is one).


Cover of Learning Python, 5th Edition


This information about 'else' block is important.