Is there a clever way to iterate over two lists in Python (without using list comprehension)?
I mean, something like this:
# (a, b) is the cartesian product between the two lists' elements
for a, b in list1, list2:
foo(a, b)
instead of:
for a in list1:
for b in list2:
foo(a, b)