Lambda function-
-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.
Syntax-
lambda argument:expression
-So for check the number is even or odd, we pass one argument, or in expression we write a condition for even odd checking.
program-
#lambda function with recursion
check=lambda x: 1 if x%2==0 else 0
print("Enter number to check even or odd")
if check(int(input())):
print("Even")
else:
print("Odd")
Enter number to check even or odd
3
Odd
Enter number to check even or odd
4
Even