"If a worker wants to do his job well, he must first sharpen his tools." - Confucius, "The Analects of Confucius. Lu Linggong"
Front page > Programming > Data type in python

Data type in python

Published on 2024-11-06
Browse:562

Data type in python

Build in datatype
text type:string
Numeric type:int, float,complex
sequence type:List,Tuple,range
mapping type:Dictionary
set type:set,frozenset
Boolean type:bool
binary type:bytes,bytearray,memory view
none type:none type
program
a="Avinash"
print(type(a))
b=45
print(type(b))
c=5.0
print(type(c))
d=5 8
print(type(d))
e=["pencil","box","scale"]
print(type(e))
f=("Apple","orange","banana")
print(type(f))
for i in range(5,9):
print(i)
g=True
print(type(g))
h=False
print(type(h))
i={}
print(type(i))
j={5,7,8,99}
print(type(j))
o/p






5
6
7
8



Release Statement This article is reproduced at: https://dev.to/avinash_mathi_483b018e36b/data-type-in-python-c43?1 If there is any infringement, please contact [email protected] to delete it
Latest tutorial More>

Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.

Copyright© 2022 湘ICP备2022001581号-3