Hello,
I know I can get Cartesian products using
How can I get the result (a,b,a1,a2,b1,b2)? That is, how can I get the shortest possible products first and then increment to the longest ones?
Thanks
I know I can get Cartesian products using
itertools.product(a,b)Assuming that
a = ['a','b']and
b = ['1','2']the result would be (a1,a2,b1,b2).
How can I get the result (a,b,a1,a2,b1,b2)? That is, how can I get the shortest possible products first and then increment to the longest ones?
Thanks