-In Python, anonymous function means that a function is without a name. As we already know that def keyword is used to define the normal functions and the lambda keyword is used to create anonymous functions.
-reduce() is a python function which apply on the particular function to manipulate the given sequence.
-It is defined in functools module.
#import the functools module
#take input of the list
print("Enter number in list")
print("Sum of list is :",x)
Enter number in list
1 2 3 4
Sum of list is : 10
-In this program, we take an input of the list, then instead of making a function and pass in reduce, we directly make a lambda function which take two values and return their addition.