l = [[1, 2], [3, 4], [5, 6]] 为二维列表
new_l = sum(l, []) 即可转化为一维列表
元组类似
t = ((1, 2), (3, 4), (5, 6)) 为二维元组
new_t = sum(t, ()) 即可转化为一维元组
l = [[1, 2], [3, 4], [5, 6]] 为二维列表
new_l = sum(l, []) 即可转化为一维列表
元组类似
t = ((1, 2), (3, 4), (5, 6)) 为二维元组
new_t = sum(t, ()) 即可转化为一维元组