Categories

Dec 14, 2019 in Python
Q: What Are The Principal Differences Between The Lambda And Def?

1 Answer

Dec 14, 2019
Lambda Vs. Def.

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

Def generates a function and designates a name to call it later. Lambda forms a function object and returns it.

Def can have a return statement. Lambda can’t have return statements.

Lambda supports to get used inside a list and dictionary.
Click here to read more about Python
Click here to read more about Insurance

Related questions

Madanswer
Nov 14 in JAVA
Aug 8 in DevOps
Apr 20 in JIRA
...