-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDictionary.py
More file actions
51 lines (42 loc) · 892 Bytes
/
Dictionary.py
File metadata and controls
51 lines (42 loc) · 892 Bytes
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
"""dictonary"""
# x ={1:2,"list":[1,2.5,"name",0],3:'hello',}
# print(x)
# y = x.keys()
# print(y)
# z = x.values()
# print(z)
# print(type(x),type(y),type(z))
# x.clear()
# print(x)
# print(type(x))
# x ={1:2,"list":[1,2.5,"name",0],3:'hello',}
# x.clear()
# print(x)
# y = x.copy()
# print(y)
# y = dict.fromkeys(x)
# z = dict.fromkeys(x,[1,2.5,'hello'])
# print(y)
# print(z)
# print(x.get(3))
# print(x.get('name'))
# print(y.items())
# print(y.keys())
# print(y.values())
# z.pop(3)
# print(z)
# print(x.popitem())
# x.setdefault(4,5.2)
# print(x)
# a = {"A":5,"B":7.2}
# a.update(B=8,C="name")
# print(a)
"""tuple"""
# x = (1,2,5.6,'dhyey')
# print(x)
# print(type(x))
# print(x[1])
"""sets"""
# x = {1,2,3,4,5,6,'hello',8,89,4.6,998,566,76,34,56,5,89}
# print(x)
# print(type(x))