Example 1: python zip function
>>> numbers = [1, 2, 3]
>>> letters = ['a', 'b', 'c']
>>> zipped = zip(numbers, letters)
>>> zipped
<zip object at 0x7fa4831153c8>
>>> type(zipped)
<class 'zip'>
>>> list(zipped)
[(1, 'a'), (2, 'b'), (3, 'c')]
Example 2: python zip a list of lists
list(zip(*[[list], [of], [lists]]))
list_of_lists = [[1,2], [3,4], [5,6]]
list(zip(*list_of_lists))
--> [(1, 3, 5), (2, 4, 6)]
list_of_lists = [[1,2], ['a',4], [5,6,7]]
list(zip(*list_of_lists))
--> [(1, 'a', 5), (2, 4, 6)]
Example 3: python zip function
>>> letters = ['a', 'b', 'c']
>>> numbers = [0, 1, 2]
>>> for l, n in zip(letters, numbers):
... print(f'Letter: {l}')
... print(f'Number: {n}')
...
Letter: a
Number: 0
Letter: b
Number: 1
Letter: c
Number: 2