Given two or more sequences , S0, S1, ... with the same number of elements, you can
combine them to produce a list of tuples S2( such
that each v0, v1, ...) comes from v0,
each S0 comes from v1, and so
on.
S1
The action of this function is probably best explained by examples:
>>> L1=[1,2,3,4] >>> L2=['a', 'b', 'c', 'd'] >>> zip(L1, L2) [(1, 'a'), (2, 'b'), (3, 'c'), (4, 'd')] >>> L3=[10.0, 20.0, 30.0, 40.0] >>> zip(L1, L2, L3) [(1, 'a', 10.0), (2, 'b', 20.0), (3, 'c', 30.0), (4, 'd', 40.0)]