回答編集履歴
1
別解の追加
test
CHANGED
@@ -9,3 +9,21 @@
|
|
9
9
|
print(lis)
|
10
10
|
|
11
11
|
```
|
12
|
+
|
13
|
+
**追記**
|
14
|
+
|
15
|
+
次のように書いたほうがいいんでしょうけどね。
|
16
|
+
|
17
|
+
```Python
|
18
|
+
|
19
|
+
lis = [['2',"apple","0.91"],['3','orange',"1.14"],['5','grape','1.90']]
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
for e in lis:
|
24
|
+
|
25
|
+
e[0] = int(e[0])
|
26
|
+
|
27
|
+
print(lis)
|
28
|
+
|
29
|
+
```
|