Data types in python

Python is dynamically typed language here we don’t need to specify the data type of any variable , according to type of value it will assign the data type

There are basically 8 inbuilt data types in python

1.INT

2.FLOAT.

3.STRING

4.LIST

5.Tuple

6.DICT

7.SET

8.BOOL

Now we will see each data type one by one

INTwhole numbers

Example: 1, 20 ,37

FLOAT → Number with decimal point 

Example : 1. 3, 4.5

String–> ordered collection of character

Example : “techi”

List →  Ordered sequence of objects which is denoted in [], its allows duplicate values

Mutable

Example : [1,”Technical”,3.4, ]

Dict →  unordered key pair

Example :

{“roll_n0” : 167, “name” :”tech”}

Tuple→ it is ordered and immutable, its can have duplicates

Example : (1,”tech”,23)

Set →  unordered ,un index  , no duplicate

{“a”,”b”}

Bool → 

Logical value

TRUE or false

i hope everything is cleared

Leave a Reply

Your email address will not be published. Required fields are marked *