total = 0 partial_sums = [total := total + v for v in values] print("Total:", total)