回答編集履歴
3
お
test
CHANGED
@@ -20,12 +20,6 @@
|
|
20
20
|
|
21
21
|
|
22
22
|
|
23
|
-
key = [[0, 1], [0, 2], [0, 3], [0, 4], [0, 5]]
|
24
|
-
|
25
|
-
value = [[0, 1, 2, 3], [0, 2, 3], [0, 3], [0, 4, 3], [0, 5, 4, 3]]
|
26
|
-
|
27
|
-
|
28
|
-
|
29
23
|
# 値の参照の仕方
|
30
24
|
|
31
25
|
print(d[(0, 1)]) # (0, 1, 2, 3)
|
2
h
test
CHANGED
@@ -26,20 +26,6 @@
|
|
26
26
|
|
27
27
|
|
28
28
|
|
29
|
-
key = list(map(tuple, key))
|
30
|
-
|
31
|
-
value = list(map(tuple, value))
|
32
|
-
|
33
|
-
print(key)
|
34
|
-
|
35
|
-
print(value)
|
36
|
-
|
37
|
-
# [(0, 1), (0, 2), (0, 3), (0, 4), (0, 5)]
|
38
|
-
|
39
|
-
# [(0, 1, 2, 3), (0, 2, 3), (0, 3), (0, 4, 3), (0, 5, 4, 3)]
|
40
|
-
|
41
|
-
|
42
|
-
|
43
29
|
# 値の参照の仕方
|
44
30
|
|
45
31
|
print(d[(0, 1)]) # (0, 1, 2, 3)
|
1
d
test
CHANGED
@@ -20,4 +20,28 @@
|
|
20
20
|
|
21
21
|
|
22
22
|
|
23
|
+
key = [[0, 1], [0, 2], [0, 3], [0, 4], [0, 5]]
|
24
|
+
|
25
|
+
value = [[0, 1, 2, 3], [0, 2, 3], [0, 3], [0, 4, 3], [0, 5, 4, 3]]
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
key = list(map(tuple, key))
|
30
|
+
|
31
|
+
value = list(map(tuple, value))
|
32
|
+
|
33
|
+
print(key)
|
34
|
+
|
35
|
+
print(value)
|
36
|
+
|
37
|
+
# [(0, 1), (0, 2), (0, 3), (0, 4), (0, 5)]
|
38
|
+
|
39
|
+
# [(0, 1, 2, 3), (0, 2, 3), (0, 3), (0, 4, 3), (0, 5, 4, 3)]
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
# 値の参照の仕方
|
44
|
+
|
45
|
+
print(d[(0, 1)]) # (0, 1, 2, 3)
|
46
|
+
|
23
47
|
```
|