-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathvideo10.py
More file actions
68 lines (45 loc) · 722 Bytes
/
video10.py
File metadata and controls
68 lines (45 loc) · 722 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# -*- coding: utf-8 -*-
"""Video10.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1vg2lUr9nHENEL-nntTBbQEwbBN_CGr9D
"""
#Tuple
t = ()
t8 = tuple()
type(t8)
mt = (2, 3.14, "ahb", False)
mt
mt[0]
mt.index('ahb')
mt[2]
mt.count("ahb")
# Dictionary key-value
d = {}
type(d)
d = dict()
di = {
1:"yek",
"1":"yek ch",
"2":"do",
"3":"se"
}
di
di['1']
di[1]
di[4]="chahar"
di
#di[25]
print(di.get("ali",False))
di = {
"1":"yek ch",
"2":"do",
"3":"se"
}
x = input("kilid ra vared konid : ")
if di.get(x, False):
print(di[x])
else:
di[x]=input("value ra vared kon : ")
print("ezafe shod...")
print(di)