The collections module
When Python general purpose built-in containers (tuple
, list
, set
, and dict
) aren't enough, we can find specialized container data types in the collections
module. They are:
Data type |
Description |
---|---|
|
A factory function for creating tuple subclasses with named fields |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A wrapper around dictionary objects for easier dict subclassing |
|
Get Python: Journey from Novice to Expert now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.