回答編集履歴
2
listに戻す処理を追加!
test
CHANGED
@@ -22,6 +22,12 @@
|
|
22
22
|
|
23
23
|
print(items)
|
24
24
|
|
25
|
+
# dequeからlistに戻す
|
26
|
+
|
27
|
+
code = list(items)
|
28
|
+
|
29
|
+
print(code)
|
30
|
+
|
25
31
|
|
26
32
|
|
27
33
|
if __name__ == '__main__':
|
1
本文にリンクを追加
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
dequeを使ってもいいなら。
|
1
|
+
[deque](https://docs.python.jp/3/library/collections.html#deque-objects)を使ってもいいなら。
|
2
2
|
|
3
3
|
```python
|
4
4
|
|
@@ -29,3 +29,9 @@
|
|
29
29
|
main()
|
30
30
|
|
31
31
|
```
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
参考
|
36
|
+
|
37
|
+
[deque#rotate](https://docs.python.jp/3/library/collections.html#collections.deque.rotate)
|