Courses/Data Structures

๐Ÿ“ฆ Data Structures

Dictionaries

Key-value pairs for fast lookup.

Dictionaries map keys to values. Keys must be unique and hashable (strings, numbers, tuples).

ages = {"Ada": 36, "Linus": 54}
ages["Grace"] = 85
print(ages["Ada"])
main.py
Output
Press Run to execute.
Expected output
math: 92
english: 88
science: 95

Sign in to track your progress across lessons.