O'Reilly logo
  • Eihab Hala thinks this is interesting:

Rules for Loops

1. Use a while-loop only to loop forever, and that means probably never. This only applies to Python; other languages are different.

2. Use a for-loop for all other kinds of looping, especially if there is a fixed or limited number of things to loop over.