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