So first I want to partition list to every possible partition, without changing the order of list. Like this:
[['a', 'b', 'a']]
[['a'], ['b', 'a']]
[['a', 'b'], ['a']]
[['a'], ['b'], ['a']]
Count of ways to do this is 4. I want to remove all possible partitions that have same characters in the part. For same input than last time:
[['a'], ['b', 'a']]
[['a', 'b'], ['a']]
[['a'], ['b'], ['a']]
Removed [['a', 'b', 'a']] , because it has 2 a's in same part. How to do it in python?