Collections Module

A Container is an object that is used to store different objects and provide a way to access the contained objects and iterate over them. In Python we have dict, list, set and tuple as basic container data types.

The collections module is a built-in module that implements specialized container data types providing alternatives to Python’s general purpose built-in containers.


Counter

defaultdict


OrderedDict


namedtuple

Deque (Doubly Ended Queue) :