Why can't lambda forms in Python contain statements?

Questions by janelyn   answers by janelyn

Showing Answers 1 - 10 of 10 Answers

santosh malvi

  • Apr 9th, 2007
 

A lambda statement is used to create new function objects and then return them at runtime thats why  lambda forms in Python didn't contain statement.

  Was this answer useful?  Yes

preetam

  • Feb 5th, 2016
 

Lambda is a anonymous function, which does not have a name and no fixed number of arguments. Represented by keyword lambda followed by statement.
Ex:
sum = lambda a,b: a+b
sum(2,3)
output: 5

  Was this answer useful?  Yes

nagu

  • May 9th, 2017
 

Lambdas evaluates at run time and these do not need statements

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions