What will be an efficient way to generate unique permutations of a list?
I tried this
set(itertools.permutations(['a', 'b', 'c', 'a', 'b', 'c', 'a', 'b', 'c', 'a', 'b', 'c']))
But, as the number of different elements in the list increases, it takes too long. Sometimes even freezing the PC.