September 2026
1051 pages
35h 4m
English
The collections module in the standard library contains advanced container data types. This term refers to data types that represent collections of objects in the broadest sense. While the generic container types list, tuple, dict and set belong to the basic data types, some more specific container types can be found in the collections module.
|
Function or Data Type |
Description |
Section |
|---|---|---|
|
ChainMap |
A concatenation of dictionaries |
|
|
Counter |
A dictionary for recording frequencies |
|
|
defaultdict |
A dictionary that supports a default value for not included keys |
|
|
deque |
A doubly linked list |
|
|
namedtuple |
A function to create named tuples |
Read now
Unlock full access