What is lambda in Python?

lambda is an anonymous inline function consisting of a single expression which is evaluated when the function is called. The syntax to create a lambda function is given below.

lambda [arguments]: expression

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.