+ 3
Let's translate a regular function to lambda style.
def f(x, y):
return x+y
f = lambda x, y: x+y
Both functions do the same.
Now in first case, you could pass the function f as an argument to another function and then use it from the function.
other_function(f)
This would also work with the second way of definition.
Now the difference with lambda functions is that they don't even need to be defined before. You can just define them on the fly and pass directly:
other_function(lambda x, y: x+y)



