回答編集履歴
1
追記
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
リスト
|
1
|
+
『リストから削除する』のではなく、『新たにリストを作る』方が簡単ですよ。
|
2
2
|
|
3
3
|
```Python
|
4
4
|
|
@@ -30,10 +30,20 @@
|
|
30
30
|
|
31
31
|
# print("OK")
|
32
32
|
|
33
|
-
p
|
33
|
+
num.append(a[i])
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
if num:
|
38
|
+
|
39
|
+
print(*num, sep='\n')
|
40
|
+
|
41
|
+
else:
|
42
|
+
|
43
|
+
print('none')
|
34
44
|
|
35
45
|
```
|
36
46
|
|
37
47
|
|
38
48
|
|
39
|
-
[Wandbox](https://wandbox.org/permlink/
|
49
|
+
[Wandbox](https://wandbox.org/permlink/J0Gmdm90DYAwlM4D)
|