In this example we will show how to use the lambda function as an anonymous function inside another function in Python.
Source Code
def my_func(z):
return lambda x, y: x + y * z
my_func_1 = my_func(5)
print(my_func_1(2, 3))
Output:
17
In this example we will show how to use the lambda function as an anonymous function inside another function in Python.
def my_func(z):
return lambda x, y: x + y * z
my_func_1 = my_func(5)
print(my_func_1(2, 3))
Output:
17