Dictionaries store values indexed by unique keys. Use them for fast lookup, structured records, and counting.
A dict maps a key to a value. Look up by name, not by position.
Keys must be unique. Values can repeat.
A dictionary is like a mini-database row: each key (like "name" or "age") is mapped to a value. Keys are unique and usually immutable (strings, numbers, tuples). Access values by their key: person['name'].
Dictionaries are used for JSON-like records, frequency counters, configuration maps, and whenever you need O(1) lookup by a label instead of by position.
mydict[key] or safe access with mydict.get(key, default).Answer all questions, then click Check answers. Use this before Practice in the editor.
Q1. What does a dictionary store?
Q2. How do you read a value for key k?
Q3. Are dictionary keys usually unique?
Q4. Word frequency is best stored in a…