Hi, this question might have similars in SO but my case is a bit different. and I tried to adapt those answers to my problem but couldn't. so here is the thing: I have this list :
[(['c', 'a', 'b'], 10), (['c', 'a', 'b'], 9),(['h','b'],2)]
for example.
I want to remove the duplicates in this list by keeping tuple that has the larger number associated with it. so the list should look like this:
[(['c', 'a', 'b'], 10),(['h','b'],2)]
can anyone help me? the order of the items inside the inner lists is very important. thanks