If I have a list like this [C, B, A, B] and I want to get all possible solutions to remove duplicates: [C, B, A], [C, A, B] How can I get this result in pure python?