I have a list of tuples as:
values = [('n', 2), ('b', 5), ('d',6), ('b',3)]
I would like to add the integer value if the first element is the same so I get a new list as:
valuesNew = [('n', 2), ('b', 8), ('d',6)]
I would appreciate any help. Thanks!