Programming in Python
0 of 222 complete

Section 5: Loops and iteration · Notes

Section notes

  • while repeats as long as its condition is true; watch out for infinite loops.
  • for walks through the items of a collection one by one.
  • break leaves the loop; continue skips to the next round.
  • Common patterns: counting, summing, finding the largest and the smallest.

Your progress is saved in this browser. Accounts are coming so it follows you across devices.