Grab unique tuples in python list, irrespective of order
问题 I have a python list: [ (2,2),(2,3),(1,4),(2,2), etc...] What I need is some kind of function that reduces it to its unique components... which would be, in the above list: [ (2,2),(2,3),(1,4) ] numpy unique does not quite do this. I can think of a way to do it--convert my tuples to numbers, [22,23,14,etc.] , find the uniques, and work back from there...but I don't know if the complexity won't get out of hand. Is there a function that will do what I am trying to do with tuples? Here is a