# Data Types In Pyhtone
# 1. string: All The a,b,c..... alphabests is callled a string.
a = "hello words"
print(type(a))
# 2. Intigir: All The Numercal Letters Is Called A Intiger Like 1,2,3,4,5,6.....
b = 1
print(type(b))
# 3. float: All The . Vale Is Called Float Like 10.2 or 20.2 or 0.5
c = 20.5
print(type(c))
# 4. complex: Sting and numercal Value Is Called Complex Like This 5x or 8j or 6d
# 5. List: Multipale Values In a List String + Intigir
d = ["apple", "banana", "orange", 5, 10]
print(type(d))
# 6. Tuple: Tuple Values Does Not Changeble. Same As It List
e = ("apple", "banana", "orange", 5, 10)
print(type(e))
# 7. Range:
f = range(6)
print(type(f))
# 8. Mapping : Basically Is Used For Dictionary And Ic Called A Dictionary
g = {"manan":"hanan","age":36}
print(type(g))
# 9. Set Type:
h = {"apple", "banana" "orange", 5, 20}
print(type(h))
# 10. Boolean: whn if you answer in True or False so is called Boolean.
i = {"apple", "banana" "orange", 5, 20}
print("apple" in i)
print(50 in i)
# 11. Binary:
j = b"hello"
print(type(j))
# 12. bytearray:
k = bytearray(8)
print(type(k))
# 13. memoryview:
l = memoryview(bytes(6))
print(type(l))
# 14. None:
m = None
print(type(m))
No comments:
Post a Comment