Course
Simulator
More
Premium
Log in
Python Function Reference
Functions
zip
zip
Iterate over several iterables in parallel, producing tuples with an item from each one.
Python 3.13
1
zip
(
*
iterables
,
strict
=
False
)
*iterables
The iterables to zip.
strict
If True, raises ValueError if lengths differ.
Examples
Python 3.13
1
list
(
zip
(
[
'a'
,
'b'
]
,
[
1
,
2
]
)
)
[('a', 1), ('b', 2)]