-
Notifications
You must be signed in to change notification settings - Fork 16
/
ex05_datatype1.py
37 lines (32 loc) · 1 KB
/
ex05_datatype1.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
a = 'Hello Python' # str
b = 20 # int
c = 10.5 # float
d = 5j # complex
e = ["gaurab", "adarsh", "aditri", "gaurab"] # list - allow duplication
f = ("gaurab", "adarsh", "aditri") # tuple
g = range(6) # range
h = {"fname": "gaurab", "lname": "kumar"} # dict
i = {"gaurab", "adarsh", "aditri"} # set
j = frozenset({"gaurab", "adarsh", "aditri"}) # frozenset
k = True # bool
l = b"Hello" # byte
m = bytearray(5) # bytearray
n = memoryview(bytes(5)) # memoryview
o = None #None
for item in g:
print(item)
print(a)
print(b)
print(c)
print(d)
print(e)
print(f)
print(g)
print(h)
print(i)
print(j)
print(k)
print(l)
print(m)
print(n)
print(o)