![]() Following are the specialized data structures in collections module. Specialized Collection Data StructuresĬollections module in python implements specialized data structures which provide alternative to python’s built-in container data types. It comes with a python module named collections which has specialized data structures. But as we all know, python always has a little something extra to offer. These are the python’s general purpose built-in container data types. We use square brackets to declare a dictionary. It is not indexed and does not have duplicate entries as well.Ī dictionary has key value pairs and is mutable in nature. ![]() They have different characteristics based on the declaration and the usage.Ī list is declared in square brackets, it is mutable, stores duplicate values and elements can be accessed using indexes.Ī tuple is ordered and immutable in nature, although duplicate entries can be there inside a tuple.Ī set is unordered and declared in square brackets. What Are Collections In Python?Ĭollections in python are basically container data types, namely lists, sets, tuples, dictionary. Kick-start your learning and optimize the way you perceive programming, enroll into Edureka’s Python online course certification program and unleash the endless possibilities with python. Following are the subjects shrouded in this blog: In this blog, we will go through each of those specialized data structures in detail. But python also comes with a built-in module known as collections which has specialized data structures which basically covers for the shortcomings of the four data types. Python programming language has four collection data types- list, tuple, sets and dictionary.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |