Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Sum Consecutives by pakhomovegor
from itertools import groupby
sum_consecutives = lambda a: [sum(list(x)) for _,x in groupby(a)]
July 26, 2021