# Python Data Structure- Part 1

Python is a modern, easy-to-learn, object-oriented programming language. It has a powerful set of built-in data types. If you are new to python language, then this blog is will help you learn. This blog contains basic linear data structure of python.


- **List:** It is a linear data structure in Python that is a mutable, or changeable, ordered sequence of elements. They are heterogeneous, meaning that the data objects need not all be from the same class and the collection can be assigned to a variable.

eg: List=[1,2,3,’a’,True]

**Operation performed on the list:
**
  
![list.PNG](https://cdn.hashnode.com/res/hashnode/image/upload/v1613215249931/OOyIm-rKS.png)

- **Tuple: **They are very similar to lists in that they are heterogeneous sequences of data. The difference is that a tuple is immutable, like a string. A tuple cannot be changed. Operations performed on tuple are same as that of the list except the assignment operation as we cannot change items in the tuple.

eg: Tuple = (2,True,4.96)


- **Sets:** A set is an unordered collection of zero or more immutable Python data objects. Sets do not allow duplicates and are written as comma-delimited values enclosed in curly braces. The empty set is represented by set(). Sets are heterogeneous, and the collection can be assigned to a variable.

eg: set={1,2,3,’a’,True}

**Operation performed on the set:**
  
![set.PNG](https://cdn.hashnode.com/res/hashnode/image/upload/v1613215308320/pKs13m13S.png)


-** Dictionary: **Dictionaries are collections of associated pairs of items where each pair consists of a key and a value. This key-value pair is typically written as key: value. It is unordered structure.

eg: dicti={1:’a’;2:’b’:3:’c’}

**Operation performed on the dictionary:
** 
![dictionary.PNG](https://cdn.hashnode.com/res/hashnode/image/upload/v1613215355212/Ht4HLKFCv.png)


-  **String:** They are sequential collections of zero or more letters, numbers and other symbols. We call these letters, numbers and other symbols characters.

eg: s=’abcbd’

**Operation performed on string:**

![string.PNG](https://cdn.hashnode.com/res/hashnode/image/upload/v1613215389884/lLhaUqqF-.png)



Hope you find this article helpful. Check out my next  [article](https://prachi1179.hashnode.dev/python-data-structure-part-2), to learn about other data structure in Python. Until then, keep learning!


