What is a lambda statement? Provide an example.

Answer Posted / seshadri d

A lambda is a function which can we give any arguments but it can write the single statement.
Example :- x = lambda i,j : i+j
print(x(4,5))

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How are the functions help() and dir() different?

465


What are key words in python?

480


What’s the difference between raw_input() and input() in python3.x?

491


How much ram is required for python?

444


Should I learn r or python first?

464






How is exception handling done in python?

477


Are strings mutable in python?

457


What is python constructor?

496


Should a function always return a value python?

437


Is there a main in python?

451


What are the differences between pyramid, django, and flask?

508


Explain the interpretation in python?

468


Which is the default function in a class?

470


Which certification is best for python?

482


What is the shortest method to open a text file and display its content?

503