JavaShuo
3六、如何实现[‘1’,’2’,’3’]变成[1,2,3] ?
时间 2019-11-16
标签
如何
实现
变成
a=[
'
1
'
,
'
2
'
,
'
3
'
] b
=[int(i)
for
i
in
a]
print
(b)
输出为:[1, 2, 3]
spa