DEV Community

Cover image for Data Types - Python
Ibrahim S
Ibrahim S

Posted on

Data Types - Python

Integer, is a whole number, positive or negative, without decimals, of unlimited length.

The float data types are used to store positive and negative numbers with a decimal point, like 35.3, -2.34.

The complex() function returns a complex number by specifying a real number and an imaginary number.

Image description

Boolean variable can have only two values - True or False

String is a collection of alphabets, words or other characters

A list is a data structure in Python that is a mutable, or changeable, ordered sequence of elements

Image description

Tuples are immutable, meaning they cannot be changed once they are created.

Set is used to store several items in a single variable.

Dictionaries are used to store data values in key:value pairs.

Image description


Top comments (0)