← All tips

Python: `zip` to iterate in parallel

pythonbasics

Pair up two lists cleanly.

for a, b in zip([1,2], ['x','y']):
    print(a, b)