Write a Python program that uses a lambda function to add three given numbers. The function should return the sum.
Example 1:
Input: 1, 2, 3
Output: 6
Example 2:
Input: 10, 20, 30
Output: 60
Use a lambda function to create an anonymous function that adds three numbers.
# Define the lambda function
add_three_numbers = lambda x, y, z: x + y + z
# Test the function
print(add_three_numbers(1, 2, 3)) # Output: 6
print(add_three_numbers(10, 20, 30)) # Output: 60
NOTEOwing to browser caching, any code input into the Trinket IDE might carry over across page refreshes or when transitioning between different questions. To commence with a clean slate, either click on the 'Reset Button' found within the IDE's Hamburger icon (☰) menu or resort to using Chrome's Incognito Mode.