zip 使用
>>> z = [(1,2),(3,"d"),(4,"e")]
>>> z
[(1, 2), (3, 'd'), (4, 'e')]
>>> zip(*z)
<zip object at 0x101aae248>
>>> for i in zip(*z):
... print(i)
...
(1, 3, 4)
(2, 'd', 'e')
>>> z
[(1, 2), (3, 'd'), (4, 'e')]
>>> l = (1,2,3)
>>> l2= (3,4,5)
>>> zip(l,l2)
<zip object at 0x101aae248>
>>> for i in zip(l,l2):
... print(i)
...
(1, 3)
(2, 4)
(3, 5)