from itertools import groupby
from operator import itemgetter
L = [('grape', 100), ('grape', 3), ('apple', 15), ('apple', 10), ('apple', 
    4), ('banana', 3)]
[(x, sum(map(itemgetter(1), y))) for x, y in groupby(L, itemgetter(0))]
Группировка списка кортежей Python