Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
2-liner: groupby made it easy solution in Creative category for Sum Consecutives by Stensen
from itertools import groupby
sum_consecutives = lambda data: [sum(list(occur)) for _, occur in groupby(data)]
Oct. 11, 2020