Itertool's groupby and sum solution in Clear category for Sum Consecutives by kkkkk
from itertools import groupby
"""Return sums of consecutive numbers in given list."""
return [sum(g) for _, g in groupby(num_list)]
Oct. 9, 2019