You are on page 1of 8

Python Data Types

Integer
20

Numeric Complex
1+3J

Float
Dictionary
43.85
{1,’A’,2,’B’}

Data Types Boolean


TRUE,FALSE

Set
{2,4,6} String

Sequence List
Type [2,’A’,7.5]

Tuple
(4,’B’,4.5)
Python Data Types

Data types are the classification or categorization of data


items. It represents the kind of value that tells what operations
can be performed on a particular data. Since everything is an
object in Python programming.

Data Types:

• String (str): It's like a container for words or text. You


can put letters, numbers, or even emojis inside.

• Integer (int): This container holds whole numbers. No


fractions or decimals—just plain counting numbers.
• Float (float): This container is for numbers with
decimals. It's like a math toolbox for handling more
precise quantities.

• Boolean (bool): This container has only two


compartments: one for "True" and one for "False." It's
like a switch that can be either on or off.

• List: Think of this as a bag that can hold many things in


a particular order. You can put strings, integers, or other
lists inside.

• Tuple: Similar to a list, but once you put things in, you
can't change them. It's like a bag that's sealed shut once
you fill it.
• Set: Picture a box where you throw in different things,
but each thing is unique. No duplicates are allowed
inside this magical box.

• Dictionary (dict): Imagine a magical book where you


look up information using special keys. It's like a real-
world dictionary, but for your computer.
String (str):

Integer (int):
Float (float):

Boolean (bool):
List :

Tuple :
Set :

Dictionary :

You might also like