Iterating over several lists

C/C++/Java/Fortran-like iteration over two arrays/lists:
for i in range(len(list)):
    e1 = list1[i];  e2 = list2[i]
    # work with e1 and e2
Pythonic version:
for e1, e2 in zip(list1, list2):
    # work with element e1 from list1 and e2 from list2
For example,
for name, value in zip(ynames, yvalues):
    y[name].append(value)

previousnexttable of contents