I am trying to get rid of all duplicates in res, but this is what happened. Res still have duplicates such as [1, 2], [1, 3],[2, 3]. How can I get res [[], [1], [2], [3], [1, 2], [1, 3], [2, 3], [1, 2, 3]]?
res=[[], [1], [2], [3], [1, 2], [1, 3], [1, 2], [2, 3], [1, 3], [2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3]]
res = [i for i, _ in itertools.groupby(res)]