【Python】一种超简单的二维列表降维方法
sum(matrix,[])
·

matrix = [[1,2],[3,4]]
print(sum(matrix,[]))
# output:
# [1, 2, 3, 4]
猜你喜欢:👇🏻
⭐【Python】判断列表 list 是否为空
⭐【Python】查找目标值在列表中的索引序号
⭐【Python】去除列表中字符串里的所有符号

更多推荐
sum(matrix,[])

matrix = [[1,2],[3,4]]
print(sum(matrix,[]))
# output:
# [1, 2, 3, 4]
猜你喜欢:👇🏻
⭐【Python】判断列表 list 是否为空
⭐【Python】查找目标值在列表中的索引序号
⭐【Python】去除列表中字符串里的所有符号

更多推荐
所有评论(0)