Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
groupby solution in Clear category for Sum Consecutives by tom-tom
from itertools import groupby
def sum_consecutives(seq):
return [sum(g) for _, g in groupby(seq)]
June 9, 2019
Comments: