Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
sum & groupby solution in Clear category for Sum Consecutives by flpo
from itertools import groupby
def sum_consecutives(a):
return (sum(g) for _, g in groupby(a))
July 8, 2019