I have a list of lists as follows:
mylist=[[a,b],[a,c],[b,c],[c,d],[d,e],[e,c]]
What I would like to do is iterate through mylist and produce a new list like this:
result=[ [ [a,b],[c,d] ] , [ [a,c],[d,e] ] , [ [b,c] ], [ [e,c] ] ]
In other words, make a list of lists, where each list contains unique combinations of entries of the initial list, so that a letter is not present twice in each entry of result list. Also each time an entry is added to result, we abstract it's sub elements from the set of available combinations of the initial list. (I guess the given example makes it more clear than the explanation).