Python Dictionaries: Your Data's Filing Cabinet

1 of 4

ICT · My World Quest — full scheme of work · pioneer

Python Dictionaries: Your Data's Filing Cabinet

3 more
1/4
For grown-ups

Companion summary

Imagine your phone's contacts app — how does it jump straight to "Maya" without searching every single name? Dictionaries power real apps like that, from Spotify linking song titles to audio files, to games storing player scores. In Python, you can write scores = {"Ali": 95, "Sam": 88} and grab Ali's score instantly with scores["Ali"]. When you feel confident, try adding, updating, and deleting keys — then see if you can build a tiny quiz-score tracker yourself.

What's Wrong With a List?

What's Wrong With a List?

Imagine you store a friend's contact details as a list: ['Maya', 17, 'London', 'maya@email.com']. Now someone asks, 'What is her email?' You have to remember that email is at index 3. That's fragile — add one item and the whole thing shifts. Here is the warm-up question to get you thinking:

💭 Think about this

If you stored 50 facts about a country as a list, how would you quickly find the population without counting through every index?