Let's say I have a list like this :
[[0.5, 5281],
[0.7, 6597],
[0.7, 6716],
[0.7, 6902],
[0.7, 5704]]
I want to sum the elements that have the same 1st element and get something like :
[[0.5, 5281],
[0.7, the result of 6597+6716+..+5704]].
IS there an easy way to do that in Python?