Vinay Garg Assistant Professor

Blog

Python

29 lessons, in order — start at lesson 1 and work down.

Python

Lesson 14: Python loops: while and for

A loop repeats work. Use for when you know how many times, or when you are walking through a collection; use while when you repeat until something changes. range()…

2 min read