Our example list:
(
[(), (2, 0)],
[(2,), (0,)],
[(), (0, 2)],
[(0,), (2,)]
)
I want to be able to remove duplicates in the list, and by this I mean same inside elements.
This means the elements [(2,), (0,)]
and [(0,), (2,)]
in the list are same. So in summary, i want to remove different order inside elements. Note that this example is of 2
inside elements but I want it for any number. I want to keep whatever comes first as long as they are not both (or a many duplicates we have) there.
I thought about sorting the inner elements, converting to str them checking for duplicates, but I am not sure if this is the way and I don't know how to make it
For example an element of [(),(2,0),(1,)]
is the same as [(),(1,),(2,0)]
.