I\'m trying to remove duplicates from a nested list only if the first 2 elements are the same, ignoring the third...
List:
L = [[\'el1\',\'el2\',\'va
this should do it:
In [55]: dict((tuple(x[:2]), x) for x in L).values() Out[55]: [['el1', 'el2', 'value2'], ['el1', 'el5', 'value3'], ['el3', 'el4', 'value2']]