Create a function that will send any number of plus 10:
x = lambda a : a + 10
print(x(5))
-
lambda keyword is used to create a small anonymous functions.
-
Lambda function can accept any number of arguments, but only has one expression.
-
This expression is evaluated and returns the result.
lambda functions with three parameters:
x = lambda a, b, c : a + b + c
print(x(5, 6, 2))