Lambda Function in Python

  

Concept & Code


Example 1:

>>> add = lambda x, y: x+y
>>> add(2,3)
5


Example 2:

>>> r = lambda a: [i for i in range(1, a, 10)]
>>> r(50)
[1, 11, 21, 31, 41]


Quiz Level 1

Quiz Level 2

Request Me


Click Here For More





Comments

Popular posts from this blog

How To Create .ENV File in Python

Create a Large file for Test Data Processing using Python

How to solve the Liner Equation using Python