According to Data Science Python Topic-2 Data Types
# Integer
print(8)
8
# 1*10^308
print(1e308)
1e+308
#Decimal/Float
print(8.55)
print(1.7e308)
8.55
1.7e+308
# Boolean(Boolean is not a text)
print(True)
print(False)
True
False
#Text/String
print('Hello World')
Hello World
#Complex
print(5+6j)
5+6j
# List->C->Array
print([1,2,3,4,5])
[1,2,3,4,5]
# Tuple
print((1,2,3,4,5))
(1,2,3,4,5)
# Sets
print({1,2,3,4,5})
{1,2,3,4,5}
# Dictionary
print({'name': 'Nitish',' gender': 'Male', 'weight':70})
{'name': 'Nitish', ' gender': 'Male', 'weight': 70}
#type
x = 20
print(type(x))
<class , int'>
Comments
Post a Comment