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.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…