In this lesson, learners will use a for-loop to iterate over list items. They will initially study a range of examples — to familiarise themselves with its syntax, use, and mechanics — before moving on to apply what they’ve learnt to similar tasks.
The activities involve iterating over lists of real-world textual and numerical data, requiring learners to recall and apply knowledge from the previous lessons.
The lesson ends with a nod towards using for to iterate over the characters of a string, which may come in handy when learners attempt to solve problems independently.
- Use iteration (for statements) to iterate over list items
- Perform common operations on lists or strings