def sum(a,b): return a+b def calculate(function,a,b): return function(a,b) calculate(sum,3,4) #returns 7