Dremendo Tag Line

Data Types in Python Programming Language

Python Basic Concepts

In this lesson, we will learn about the Data Types in the Python programming language along with a quiz on it.

What is Data Type

Data Type in Python is used to classify the value stored in a variable during the program execution. Whenever a variable is defined in Python, the interpreter allocates some memory according to the data stored in the variable. Python supports the following data types given below.

data types in Python programming language

  • Integer - It is used to store whole numbers such as 56, 8, 493 etc.
  • Complex Number - It is used to store complex number which is created from real numbers such as 9+21j, -3-9j, -72+81j etc. A complex number has two parts a real part and an imaginary part.
  • Float - It is used to store numbers with a decimal point such as 2.3, 18.12, 294.0 etc.
  • Boolean - It is used to store logical values such as True or False.
  • String - It is used to store text such as "hello", "Peter", "4586" etc.
  • Dictionary - It is used to store an unordered key and its value pairs such as {"name" : "frankie" , "age" : "18"}.
  • Set - It is used to store an unordered and unindexed collection of unique objects such as {"a", "b", "c"}.
  • List - It is used to store an ordered and changeable collection of objects such as ["apple", "banana", "cherry"].
  • Tuple - It is used to store an ordered and unchangeable collection of objects such as (15, "Albert", 18.20)

We will discuss all the data types given above in the subsequent lessons.

video-poster

Test Your Knowledge

Attempt the multiple choice quiz to check if the lesson is adequately clear to you.

Test Your Knowledge