In python, the “lambda” keyword can be used to create a small function with a simple expression within a a variable.
Instead of using the function definition syntax like this:
def f(a,b):
return a+b
You can use lambda like this:
f = lambda a,b:a+b
print(f(2,4))
This prints 6