Reduce

from functools import reduce
def add(a, b): 
    return a + b
add(10, 15)
25
reduce(add, [10, 20, 30, 40])
100