Dictionary Access
Multiple Choice Beginner
Question
What does {} use to store values?
Hint
Dictionaries map keys to values.
Explanation
Python dictionaries store key-value pairs. Keys must be hashable (strings, numbers, tuples). Access by key: d["key"]. get() returns None or a default if the key is missing: d.get("key", "default"). Since Python 3.7, dictionaries maintain insertion order. Use del d["key"] to remove, d["new"] = value to add.
Related Resources
Related Lessons
- Dictionaries
Learn Python dictionaries.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.