A name-value pair links an identifying key to its associated value. In a Python dictionary, each entry is one pair: use the key to look up the value. For example, a grocery item can be the key and its quantity the value. section 27.1
grocery = {"milk": 1, "eggs": 12, "bread": 2}
Each grocery item to the left of a colon is a key; the quantity to its right is the value. section 27.1
Pairs can change as a dictionary is updated:
- Add a pair by assigning a value to a key, as in d[k] = v. section 27.2
- Assigning a value to a key already in the dictionary replaces its previous value; keys are unique. section 27.2
- Remove a pair with d.pop(k); this removes the entry and returns its value. section 27.3










