Level 28 of 50
Looping dicts
explained with a heatwave. Watch the reel, then work through it below: run the code, take the quiz, keep the cheat sheet.
📒 Open the cheat sheetSanaLahore 41, Karachi 34. It's HOT everywhere!
TeacherLet's print every city's temperature with one loop!
weather.py
temp = {"Lahore": 41, "Karachi": 34} for city, t in temp.items(): print(city, t)
Teacher.items() hands you each key and value, together!
SanaTWO names after for?
TeacherYes! Each pair unpacks. city gets the key, t gets the value!
⏸ Pause & predict: what prints?
eidi = {"Ali": 500} for x in eidi: print(x)
Where this leads
Python is step one. Building AI that ships is the rest.
The diploma takes you from zero to deployed computer vision, LLM and agent projects, with engineers who build them for a living. Already code? The bootcamp does it in three months.