collections — Container Data Types¶
| Purpose: | Container data types. |
|---|
The collections module includes container data types beyond the
built-in types list, dict, and tuple.
- ChainMap — Search Multiple Dictionaries
- Counter — Count Hashable Objects
- defaultdict — Missing Keys Return a Default Value
- deque — Double-Ended Queue
- namedtuple — Tuple Subclass with Named Fields
- OrderedDict — Remember the Order Keys are Added to a Dictionary
- collections.abc — Abstract Base Classes for Containers
See also
- Standard library documentation for collections
- Python 2 to 3 porting notes for collections
- PEP 342 – Coroutines via Enhanced Generators
- PEP 492 – Coroutines with async and await syntax
PyMOTW-3