I have an itertools.product of three sets that looks like this:
input:
t1 = set(['R'])
t2 = set(['Y'])
t3 = set(['A', 'C', 'H', 'M', 'T', 'W', 'Y'])
list(itertools.product(t1, t2, t3))
output:
[('R', 'Y', 'A'), ('R', 'Y', 'C'), ('R', 'Y', 'H'), ('R', 'Y', 'M'), ('R', 'Y', 'T'), ('R', 'Y', 'W'), ('R', 'Y', 'Y')]
But if I try and flatten it, it makes one long list, but what I want is this:
[('RYA'), ('RYC'), ('RYH'), ('RYM'), ('RYT'), ('RYW'), ('RYY')]
Any thoughts?