回答編集履歴
1
整数の場合も追加
test
CHANGED
@@ -4,7 +4,9 @@
|
|
4
4
|
|
5
5
|
c = [b.replace("cm","") for b in a]
|
6
6
|
|
7
|
+
# 整数にしたいなら
|
7
8
|
|
9
|
+
# c = [int(b.replace("cm","")) for b in a]
|
8
10
|
|
9
11
|
print(c)
|
10
12
|
|