S2E5 Data Types

Kishan Tongrao
2 min readJan 20, 2022

Hello, my name is Kishan Tongrao. Today, we will look at all the data types present in the Python programming language.

Photo by Amador Loureiro on Unsplash

Data Types In Python

Integer

  • Also known as ‘numeric literal’.
  • Integers are immutable data types, which means that changing the value of a number data type results in the newly allocated object.
  • An integer is any number including 0, positive numbers, and negative numbers. It should be noted that an integer can never be a fraction.

Float

  • Number with fractions in it.

Complex Number

  • Any number that can be written in the form a + bi where a and b are real numbers. a is called the real part, b is called the imaginary part, and i is called the imaginary unit.

String

  • Sequence of characters

Boolean

  • Data type with two states True and False.

List

  • The datatype contains items in comma-separated and enclosed within square brackets.
  • It holds elements with multiple data types.

Tuple

  • Collection of elements which is ordered and unchangeable.

Dictionary

  • Collection of unordered, changeable and indexed elements with key-value pair.

Set

  • An ordered collection of an element with mutable nature and no duplicate elements are allowed.

Thank You!

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Kishan Tongrao
Kishan Tongrao

No responses yet

Write a response