回答編集履歴
1
結果を追加
answer
CHANGED
@@ -8,6 +8,6 @@
|
|
8
8
|
if x != result[-1]: # resultの最後の要素と違うxならresultに追加
|
9
9
|
result.append(x)
|
10
10
|
|
11
|
-
print(result)
|
11
|
+
print(result) # => [1, 2, 3, 4, 3, 5, 2, 1]
|
12
12
|
|
13
13
|
```
|