zip combines corresponding elements from multiple iterables into tuples. Each iteration advances all inputs together and stops when the shortest input ends. section 10.25
Pairing different iterables
>>> list(zip('abc', [10, 20, 30])) [('a', 10), ('b', 20), ('c', 30)] A related exercise asks for myzip([10, 20, 30], 'abc') to return [(10, 'a'), (20, 'b'), (30, 'c')]. section 3.5 section 10.25
Practice the underlying behavior by:
- Writing a generator function that yields one tuple per index. section 10.25
- Comparing the built-in iterator with a list-producing implementation for equal-length inputs. section 3.5




