top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Python: What is lambda expression and when it is used ?

+1 vote
481 views
Python: What is lambda expression and when it is used ?
posted Mar 3, 2018 by Rupam

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

lambda expression is used to create one liner function which is mainly used when you have collection of items and you want perform some operation on a particular field of each item. Lambda expression is also known as anonymous function.
Mostly it is used with map, filter and reduce where all these three uses a function as first parameter and second parameter is input (a collection of data).

answer Mar 4, 2018 by Harshita
...