What is printed?
print(list(zip([1, 2, 3], [4, 5])))
- [(1, 4), (2, 5)]
- [(1, 4), (2, 5), (3, None)]
- [(1, 2, 3), (4, 5)]
- [1, 4, 2, 5]
zip stops at the shortest iterable and drops the leftover.
Play Problem Solving ▸
print(list(zip([1, 2, 3], [4, 5])))