Code Explanation:
Function Definition:
add_numbers is a lambda function that takes two arguments, a and b.
It returns the sum of a and b.
Execution:
add_numbers(3, 7) is called with a = 3 and b = 7.
The lambda function calculates 3 + 7, which equals 10.
Print Statement:
print(result) outputs the result of the calculation, which is 10.
Output
10
0 Comments:
Post a Comment