Lesson 3: Dictionaries, finding things by name instead of position
15 min read·14 Oct 2026
Module 5 · Lesson 3 · About 45 minutes · Needs: Module 5 Lessons 1 and 2 (lists, tuples, unpacking), Module 4 (if,forloops)
The situation
Amira's question for this module is "What is out, and who has it?". This morning she puts it more sharply. "If I read you a book id off the shelf list, say B06, tell me straight away who has it."
Nine copies are out today, Wednesday 14 October. With a Lesson 1 list you would walk along it until you met B06. Python has a collection built for this job: give it a name, and it gives you the thing filed under that name.