Answers

Question and Answer:

  Home  Python Developer

⟩ Explain me what Are The Principal Differences Between The Lambda And Def?

☛ Lambda Vs Def.

def can hold multiple expressions while lambda is a uni-expression function.

def generates a function and designates a name so as to call it later. lambda forms a function and returns the function itself.

def can have a return statement. lambda can’t have return statements

lambda supports to get used inside a list and dictionary.

 149 views

More Questions for you: