回答編集履歴
1
コードを改善
test
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
a = ['×', '×', '4', '1', '×', '×', '×', '2', '×', '8', '3', '1', '2', '×', '1']
|
8
8
|
|
9
|
-
b = [s for s in
|
9
|
+
b = [s for s in reduce(add, a).split('×') if s]
|
10
10
|
|
11
11
|
print(b) # ['41', '2', '8312', '1']
|
12
12
|
|