Python zip() built-in function

From the Python 3 documentation

Iterate over several iterables in parallel, producing tuples with an item from each one.

Examples

>>> furniture = ['table', 'chair', 'rack', 'shelf']
>>> price = [100, 50, 80, 40]
>>>
>>> for item, amount in zip(furniture, price):
...     print(f'The {item} costs ${amount}')
# The table costs $100
# The chair costs $50
# The rack costs $80
# The shelf costs $40

Ups! Nothing here yet!

This is a great opportunity for you to collaborate! Hit the link at the end of this page and add some examples and a brief description. If you don't know where to start, the Python 3 documentation will lead you in the right direction.

Subscribe to pythoncheatsheet.org

Join 9.800+ Python developers in a two times a month and bullshit free publication , full of interesting, relevant links.