A value is the information associated with an attribute or dictionary key. In Python, a dictionary stores key/value pairs, such as a question answer or a descriptive phrase. section 4.1.1
Dictionary values support several everyday operations:
- Assign or replace a value with square-bracket syntax; assigning the same key again leaves one entry containing the newest value. section 4.1.1 section 4.1.3
- Inspect values directly with values(), or process keys and values together with items(). section 4.1.3
- Use a value to represent the data retrieved for a known key, such as a phrase associated with its initial letter. section 7.1
Building a lookup dictionary
Read each input line, use line[0].upper() as its key, and store line.rstrip() as its value: lookup[line[0].upper()] = line.rstrip(). The resulting dictionary maps A to a complete phrase, B to another phrase, and so on; a requested letter retrieves its associated line. section 7.3.2 section 7.1
A short REPL example shows assigning a string value to the name key. section 4.1.1







