Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
groupby solution in Clear category for Sum Consecutives by fed.kz
from itertools import groupby
def sum_consecutives(values):
return list(map(sum, [list(elem) for _, elem in groupby(values)]))
Aug. 19, 2019
Comments: