两个一元数组转成一个两元数组
list1 = [1, 2, 3]
list2 = [4, 5, 6]
list_new = [list(t) for t in zip(list1, list2)]
print(list_new) # [[1, 4], [2, 5], [3, 6]]
或者
list1 = [1, 2, 3]
list2 = [4, 5, 6]
list_new = list(map(lambda x, y: [x, y], list1, list2))
print(list_new) # [[1, 4], [2, 5], [3, 6]]
注:两个list合成字典
list1 = ['m', 'n', 't']
list2 = [1, 2, 3]
list_new = dict(map(lambda x, y: [x, y], list1, list2 ))
print(list_new ) # {'m': 1, 'n': 2, 't': 3}