Register - Login - Forgotten Password

Lesson 14: Repeating Code With For Loops

What if we already know which values Python should work through? A for loop uses those values to repeat instructions, taking one item at a time from an iterable. This raises the central question: how is this different from a while loop? The answer is that a for loop follows a supply of values, rather than repeatedly checking only a condition.

Lesson 14: Repeating Code With For Loops

This lesson just one in the category Python Programming Level 1. To access this lesson you need to have a valid learner account, ask your parent to register you now.