Code Explanation:
Function Definition:
multiply is defined as a lambda function that takes two arguments, a and b.
The function computes the product of a and b using the * operator.
Calling the Function:
The function multiply is called with the arguments 4 and 5.
Inside the lambda function, the expression 4 * 5 is evaluated, resulting in 20.
Assigning the Result:
The calculated value (20) is stored in the variable result.
Printing the Result:
The print(result) statement outputs the value stored in result, which is 20.
Output
20
0 Comments:
Post a Comment