Chapter 1. Containers and Data Structures
In this chapter, we will cover the following recipes:
- Counting frequencies—count occurrences of any hashable value
- Dictionary with fallback—have a fallback value for any missing key
- Unpacking multiple—keyword arguments—how to use
**
more than once - Ordered dictionaries—maintaining order of keys in a dictionary
- MultiDict—dictionary with multiple values per key
- Prioritizing entries—efficiently get the top of sorted entries
- Bunch—dictionaries that behave like objects
- Enumerations—handle a known set of states