# zip() # 拉链函数
lst1 = [1, 2, 3, 4, 45, 5]
lst2 = [1, 1, 1, 1, 1]
print((zip(lst1, lst2)))
print(list(zip(lst1, lst2)))
print(tuple(zip(lst1, lst2)))
print(dict(zip(lst1, lst2)))
# <zip object at 0x00000231764792C8>
# [(1, 1), (2, 1), (3, 1), (4, 1), (45, 1)]
# ((1, 1), (2, 1), (3, 1), (4, 1), (45, 1))
# {1: 1, 2: 1, 3: 1, 4: 1, 45: 1}
原文:https://www.cnblogs.com/fengting0913/p/13721361.html