I have a list of (label, count) tuples like this:
[(\'grape\', 100), (\'grape\', 3), (\'apple\', 15), (\'apple\', 10), (\'apple\', 4), (\'banana\', 3)]
my version without itertools [(k, sum([y for (x,y) in l if x == k])) for k in dict(l).keys()]
[(k, sum([y for (x,y) in l if x == k])) for k in dict(l).keys()]