I've been struggling with this for a little while so I think it's time that I asked for help. I have two lists L1, L2 each a certain number of elements long (not necessarily the same length). What is the most efficient (and pythonic) way of calculating all the possible permutations, and then print the results? The simplest way is to do
for l1 in L1:
for l2 in L2:
print(l1, l2)
but this doesn't seem very efficient to me either in calculation time or coding. Plus this expression would get very unwieldy if my number of lists grows. The "itertools" module doesn't seem to cover this kind of permutation
Thanks for all help offered!