Lesson 15: Using Range to Control Loops
Why does a loop need a sequence of numbers rather than just a repetition count? Python’s built-in function range() creates a range object that represents such a sequence. A for loop receives the represented integers one at a time through its loop variable. This distinction explains what range() supplies and how a loop uses it.
