Functions can be passed as arguments to functions
1 from scipy import sin,pi 2 3 def func(x,f): 4 return f(x) 5 6 print func(pi/2,sin)
Lambda expressions are (anonymous) one line functions
1 l=lambda x: x**2-1 2 l(4)