This function lets you iterate over the Cartesian product of a list of iterables.
For example,
for x, y in itertools.product(xrange(10), xrange(10)):
print x, y
is equivalent to
for x in xrange(10):
for y in xrange(10):
print x, y
Like all python functions that accept a v...