itertools.product
is very convenient to generate all permutations of a list, but how would one proceed to implicate another list of elements where only one element of that list could populate any permutation at a time ?
In pseudocode :
from itertools import product
product('ABC', repeat=1) + ['.', '%3A']
->A, B, C, .A, .B, .C, A., B., C., %3AA, %3AB, %3AC, A%3A, B%3A, C%3A
I suppose it would be non trivial and one would have to tweak the permutation building algorithm.