Python Tutorial

Python Data Types: List of Data Types With Example

What are Data Types in Python?

Data types are the classification/categorization of data components. It refers to a value that describes which operations may be performed on a collection of data. Since everything in Python programming is an object, data types are basically classes, and variables are instances (objects) of these classes.

Getting Data Type in Python

The type() method can be used to determine the data type of any object:

Example:

x = 50

print(type(x))

Output:

<class 'int'>

Built-in Data Types

Python comes with the following built-in data types:

Built-in Data Types

Did you find this article helpful?