Using the lambda
keyword we can define an anonymous function. Unlike using def
, when using lambda
we can have one single expression. We cannot have a block of statements.
ob = lambda a,b,c:a+b+c print(ob(1,2,3))
The following video clip provides more explanation about lambda expressions in Python.