Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Sum Consecutives by Oleg_Domokeev
from itertools import groupby
def sum_consecutives(a):
return [k * len(list(g)) for k, g in groupby(a)]
July 10, 2019