-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path181-190.py
167 lines (149 loc) · 2.38 KB
/
181-190.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
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
## 181
"""
define list 'apart' by row
101 102
201 202
301 302
"""
apart = [["room 101", "room 102"], ["room 201", "room 202"], ["room 301", "room 302"]]
print(apart)
## 182
"""
define list 'stock' by column
start | end
100 | 80
200 | 210
300 | 330
"""
stock = [["start", 100, 200, 300], ["end", 80, 210, 330]]
print(stock)
## 183
"""
define dictionary 'stock' by column.
start/end : key
other : value
start | end
100 | 80
200 | 210
300 | 330
"""
stock = {
"start" : [100, 200, 300],
"end" : [80, 210, 330]
}
print(stock)
## 184
"""
make this table to dictionary 'stock'.
using date for key, other row's will be value of list type.
10/10 | 80 110 70 90
10/11 | 210 230 190 200
"""
stock = {
"10/10" : [80, 110, 70, 90],
"10/11" : [210, 230, 190, 200]
}
print(stock)
## 185
"""
print list like example
apart = [ [101, 102], [201, 202], [301, 302] ]
room 101
room 102
room 201
room 202
room 301
room 302
"""
apart = [ [101, 102], [201, 202], [301, 302] ]
for row in apart:
for col in row:
print(f"room {col}")
## 186
"""
print list like example
apart = [ [101, 102], [201, 202], [301, 302] ]
room 301
room 302
room 201
room 202
room 101
room 102
"""
apart = [ [101, 102], [201, 202], [301, 302] ]
for row in apart[::-1]:
for col in row:
print(f"room {col}")
## 187
"""
print list like example
apart = [ [101, 102], [201, 202], [301, 302] ]
room 302
room 301
room 202
room 201
room 102
room 101
"""
apart = [ [101, 102], [201, 202], [301, 302] ]
for row in apart[::-1]:
for col in row[::-1]:
print(f"room {col}")
## 188
"""
print list like example
apart = [ [101, 102], [201, 202], [301, 302] ]
room 101
-----
room 102
-----
room 201
-----
room 202
-----
room 301
-----
room 302
-----
"""
apart = [ [101, 102], [201, 202], [301, 302] ]
for row in apart:
for col in row:
print(f"room {col}")
print("-----")
## 189
"""
print list like example
apart = [ [101, 102], [201, 202], [301, 302] ]
room 101
room 102
-----
room 201
room 202
-----
room 301
room 302
-----
"""
apart = [ [101, 102], [201, 202], [301, 302] ]
for row in apart:
for col in row:
print(f"room {col}")
print("-----")
## 190
"""
print list like example
apart = [ [101, 102], [201, 202], [301, 302] ]
room 101
room 102
room 201
room 202
room 301
room 302
-----
"""
apart = [ [101, 102], [201, 202], [301, 302] ]
for row in apart:
for col in row:
print(f"room {col}")
print("-----")