Make delicious recipes!


zip is a function which accepts variable number of arguments and creates tuples such that:
- first tuple contains first element of all arguments.
- second tuple contains second element of all arguments.
and so on.


>>> x = [1,2,3]
>>> y = ['a', 'b', 'c']

>>> zip (x,y)
<zip object at 0x027B8030>

>>> list (zip (x,y))
[(1, 'a'), (2, 'b'), (3, 'c')]

>>> list (zip (x,y,x,y))
[(1, 'a', 1, 'a'), (2, 'b', 2, 'b'), (3, 'c', 3, 'c')]

Like us on Facebook to remain in touch
with the latest in technology and tutorials!

Got a thought to share or found a
bug in the code?
We'd love to hear from you:

Email: (Your email is not shared with anybody)

Facebook comments:

Site Owner: Sachin Goyal