CoursePython from Scratch to Intermediate · Module 5: Collections · part 33 of 75
Part 33 · Module 5: Collections

Lesson 1: Lists, many values kept in order under one name

15 min read·14 Oct 2026
Module 5 · Lesson 1 · About 45 minutes · Needs: Module 3 (strings, indexing and slicing, f-strings), Module 4 (for loops, the accumulator pattern)

The situation

Amira opens the module with one question: "What is out, and who has it?" Today, Wednesday 14 October, nine copies are off the shelf. So far you would need nine variables to hold them, with no way to count, search or loop over them in one go.

Python has a value made for exactly this: a list, many values kept in order under one name. This lesson puts today's nine loans in one list and asks it Amira's questions.

OUT: NINE LOANS, IN BORROW ORDER [ ] L04 Jonah L13 Ben L21 Kwame L23 Lena L24 Priya L26 Sofia L28 Kwame L34 Sofia L40 Kwame first last one name, nine items, order kept
Today's nine loans out, held as one list called out, in the order they were borrowed; blue is your list and its items.

The rest of this part opens with an account

Signing up is free and takes one email. Nothing to pay, and nothing renews.