Lesson 19: for with range()
A for loop with range() repeats code a known number of times. range(n) produces the numbers 0..n-1.
for i in range(3): runs three times, with i equal to 0, 1, 2.
- for
- A loop that iterates over a collection.
- range()
- Generates a sequence of integers.