TLE
TLE copied to clipboard
Move to Python 3.8
It's walrus time!
total = 0
partial_sums = [total := total + v for v in values]
partial_sums = list(itertools.accumulate(values))