Lambda Functions in Python


Short anonymous functions defined with the lambda keyword.

Source Code

# A simple lambda function to add two numbers
add = lambda x, y: x + y
print(add(5, 3))
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments