Preface
1. Data Structures and Algorithms
1.1. Unpacking a Sequence into Separate Variables
1.2. Unpacking Elements from Iterables of Arbitrary Length
1.3. Keeping the Last N Items
1.4. Finding the Largest or Smallest N Items
1.5. Implementing a Priority Queue
1.6. Mapping Keys to Multiple Values in a Dictionary
1.7. Keeping Dictionaries in Order
1.8. Calculating with Dictionaries
1.9. Finding Commonalities in Two Dictionaries
1.10. Removing Duplicates from a Sequence while Maintaining Order
1.11. Naming a Slice
1.12. Determining the Most Frequently Occurring Items in a Sequence
1.13. Sorting a List of Dictionaries by a Common Key
1.14. Sorting Objects Without Native Comparisofi Support
1.15. Grouping Records Together Based on a Field
1.16. Filtering Sequence Elements
1.17. Extracting a Subset of a Dictionary
1.18. Mapping Names to Sequence Elements
1.19. Transforming and Reducing Data at the Same Time
1.20. Combining Multiple Mappings into a Single Mapping
2. Strings and Text
3. Numbers, Dates, and Times
4. Iterators and Generators
5. Files and IO
6. Data Encoding and Processing
7. Functions
8. Classes and Objects
9 .Metaprogramming
10. Modules and Packages
11. Network and Web Programming
12. Concurrency
13. Utility Scripting and System Administration
14. Testing, Debugging, and Exceptions
15. C Extensions
A. Further Reading
Index