Tag Archives: Python collections-module

In simple words, any object that could be looped over is iterable. For instance, a list object is iterable and so is an str object.… Read More
Both queue.queue and collections.deque commands give an idea about queues in general to the reader but, both have a very different application hence shouldn’t be… Read More
Both LIFOQueue and Deque can be used using in-built modules Queue and Collections in Python, both of them are data structures and are widely used,… Read More
Deque is a Double Ended Queue which is implemented using the collections module in Python. Let us see how can we get the first and… Read More
Counter class is a special type of object data-set provided with the collections module in Python3. Collections module provides the user with specialized container datatypes,… Read More
Data Class: Data Class is a type of class that is used to store data without any functionality. These data classes are just regular classes… Read More
The collection Module in Python provides different types of containers. A Container is an object that is used to store different objects and provide a… Read More
An OrderedDict is a dict that remembers the order that keys were first inserted. If a new entry overwrites an existing entry, the original insertion… Read More
Python Lists are array-like data structure but unlike it can be homogenous. A single list may contain DataTypes like Integers, Strings, as well as Objects.… Read More
An unordered collection of data value that is used to store data values like a map is known as Dictionary in Python. Unlike other Data… Read More
Strings are the arrays of bytes representing Unicode characters. However, Python does not support the character data type. A character is a string of length… Read More
Dictionary in Python is an unordered collection of data values that are used to store data values like a map. Unlike other Data Types that… Read More
Python contains a container called “ChainMap” which encapsulates many dictionaries into one unit. ChainMap is member of module “collections“. Example: filter_none edit close play_arrow link… Read More
Python supports a type of container like dictionaries called “namedtuple()” present in module, “collections“. Like dictionaries they contain keys that are hashed to a particular… Read More
Deque (Doubly Ended Queue) in Python is implemented using the module “collections“. Deque is preferred over list in the cases where we need quicker append… Read More