lst = [[0, 1], [0, 4], [1, 0], [4, 0]]
data = {tuple(item) for item in map(sorted, lst)} # method 1
data = {tuple(sorted(item)) for item in lst} # method 2
Created
May 29, 2018 20:30
-
-
Save zhoudaxia233/5f00befdb84c86569ffca972475eadcd to your computer and use it in GitHub Desktop.
Remove reversed duplicates in list
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment