list=[[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 :
list=[[1,2],[4,5],[3,4]]
How do I achieve this in Python?
list=[[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 :
list=[[1,2],[4,5],[3,4]]
How do I achieve this in Python?
If the Order Matters you can always use OrderedDict
This won't preserve order from your original list, nor will it preserve order of your sublists.