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