combinations = []
for i, x in enumerate(items):
    combinations.append(x)
accum = x
for y in items[i + 1:]:
    accum += y
combinations.append(accum)
How to create a sequential combined list in python?