1>>> letters = ['a', 'b', 'c']
2>>> numbers = [0, 1, 2]
3>>> for l, n in zip(letters, numbers):
4... print(f'Letter: {l}')
5... print(f'Number: {n}')
6...
7Letter: a
8Number: 0
9Letter: b
10Number: 1
11Letter: c
12Number: 2
13
1>>> x = [1, 2, 3]
2>>> y = [4, 5, 6]
3>>> zipped = zip(x, y)
4>>> list(zipped)
5[(1, 4), (2, 5), (3, 6)]
6>>> x2, y2 = zip(*zip(x, y))
7>>> x == list(x2) and y == list(y2)
8True
1>>> numbers = [1, 2, 3]
2>>> letters = ['a', 'b', 'c']
3>>> zipped = zip(numbers, letters)
4>>> zipped # Holds an iterator object
5<zip object at 0x7fa4831153c8>
6>>> type(zipped)
7<class 'zip'>
8>>> list(zipped)
9[(1, 'a'), (2, 'b'), (3, 'c')]