a = [['1', '2'], ['3', '4']]
for i in range(len(a)):
a[i] = list(map(int, a[i]))
print(a)
# a = [[1, 2], [3, 4]]
python去除list列表中的单引号
最新推荐文章于 2024-07-14 03:02:59 发布
a = [['1', '2'], ['3', '4']]
for i in range(len(a)):
a[i] = list(map(int, a[i]))
print(a)
# a = [[1, 2], [3, 4]]