I'm trying to create a list from a permutation of a str object. However the resultant list has duplicates. I have the following code:
from itertools import permutations
a = permutations('144')
b = [''.join(i) for i in a]
print(b)
What am I doing wrong? I'm getting the following:
['144', '144', '414', '441', '414', '441']