๐ฆ 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"])
๐ฆ Data Structures
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"])
Press Run to execute.math: 92 english: 88 science: 95
Sign in to track your progress across lessons.