mylist = [[1,2],[4,5],[3,4],[4,3],[2,1],[1,2]]
I want to remove duplicate items, duplicated items can be reversed. The result should be :
If order is not important:
def rem_dup(l: List[List[Any]]) -> List[List[Any]]: tuples = map(lambda t: tuple(sorted(t)), l) return [list(t) for t in set(tuples)]