Skip to content
Klay

Lists, dicts and loops

After this lesson you can: Reach for the right container and iterate over it cleanly.

First: Python crash course

Watch

Notes

Lists are for ordered collections: a batch of filenames, rows, prompts, predictions, or errors where position matters or duplicates are normal. Dictionaries are for lookups by name: configuration values, counts by label, user records by ID, or model metrics by split. The first question is not “what syntax do I remember?” but “will I usually process items in order, or retrieve a value by a key?”

Unlock the full lesson notes, the exercises and the graded checkpoint - ₹5,000 once.