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


Do your career a big favor. Join DEV. (The website you're on right now)

It takes one minute, it's free, and is worth it for your career.

Get started

Community matters

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay