This is the sequence:
l = [['A', 'G'], 'A', ['A', 'C']]
I need a third sequence of elements for each permutation
all = ['AAA','GAA','AAC','GAC']
I can not understand this! I'm having trouble maintaining the permutation order!
Do you want product :
from itertools import product l = [['A', 'G'], 'A', ['A', 'C']] print(["".join(p) for p in product(*l)])