November 2018
Beginner
304 pages
7h 35m
English
The zip() function is a great tool to process multiple sequences during the same loop. As it looks at each sequence, zip() joins the individual items from the sequences and outputs tuples with parallel items from each sequence.
In other words, if you stack two rows of items on top of each other, zip() will gather the first two items from each row and combine them in a tuple. Then, it gets the second two items from each row and makes another tuple. It continues doing this until each row is finished. Following screenshot demonstrates this functionality:

Each element in each tuple is combined concurrently ...
Read now
Unlock full access