In programming, we work with data. When we write programs, we need an efficient way to store and manage this data — that's where variables come in. Variables are like labeled containers that hold different types of data depending on what we need to do.

There are various types of data such as:

Each type of data is used differently and has its own special behaviors. Here's what some of them can do:

<aside> 🤔

You can get the data type of any object by using the type() function:

x = 5
print(type(x)) # outputs <class 'int'>

</aside>

👉 Here is a summary of categorized Python built-in data types.

Category Data Type
Textual str
Numerical int ,float, complex
Sequential list, tuple, range
Mappable dict
Set Types set
Boolean bool