I have a list of tuples, e.g:
A=[(1,2,3), (3,5,7,9), (7)]
and want to generate all permutations with one item from each tuple.
1,3,7
1,5,7
1,7,7
...
3,9,7
I can have any number of tuples and a tuple can have any number of elements.
And I can't use itertools.product() because python 2.5.