What is the purpose of using lambda functions in Python?

0 votes
What are lambda functions or anonymous functions?
Jun 11 in Python by Fata
• 320 points
17 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
The main purpose of anonymous functions come into picture when you need some function just once.  They can be created wherever they are needed. Due to this reason, Python Lambda Functions are also known as throw-away functions which are used along with other predefined functions such as filter(), map(), etc. These functions help reduce the number of lines of your code when compared to normal functions.
answered Jun 11 by Nisa
• 640 points

Related Questions In Python

0 votes
1 answer

What is the purpose of inner class in Python?

Advantages of inner class: Logical grouping of classes: ...READ MORE

answered Feb 7 in Python by SDeb
• 10,780 points
98 views
+2 votes
3 answers

what is the practical use of polymorphism in Python?

Polymorphism is the ability to present the ...READ MORE

answered Mar 31, 2018 in Python by anto.trigg4
• 3,420 points
1,060 views
0 votes
1 answer

What is the use of raw_input function in Python?

raw_input fuction is no longer available in ...READ MORE

answered May 2, 2018 in Python by aayushi
• 750 points
46 views
+1 vote
1 answer

What is the difference between range and xrange functions in Python 2.X?

xrange only stores the range params and ...READ MORE

answered Aug 22, 2018 in Python by Priyaj
• 56,140 points
91 views
0 votes
1 answer

What is the meaning of “int(a[::-1])” in Python?

Assumming a is a string. The Slice ...READ MORE

answered Aug 27, 2018 in Python by Priyaj
• 56,140 points
55 views
0 votes
1 answer

Using lambda functions to solve Algebra

Python lambda functions can be used to ...READ MORE

answered 1 day ago in Python by anonymous
10 views
0 votes
1 answer

How Lambda() is used with filter() in python?

The filter() function in Python takes in ...READ MORE

answered May 20 in Python by Rakshi
12 views
0 votes
2 answers

What is the difference between python lists and arrays?

Python arrays and lists have the same ...READ MORE

answered Jun 10 in Python by Nisa
• 640 points
24 views
0 votes
1 answer

How to check if a list is empty in python?

To check if a list is empty ...READ MORE

answered May 27 in Python by Nisa
• 640 points
11 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.