top of page

Python Lambda Function

In python lambda function use to reduce the number of the statement of normal python functions.

Let we will learn simple python function:

>>> def demo(name):

            return name

By using lambda we can write it using a single line of code.

>>>  lambda name: name

How to apply value on Lambda

>>>  (lambda name: name)(“naveen”)

>>>  result = lambda x: x *1

       result(3)

I hope it may help you in the next tutorial we will learn what is "python array". Array is the most important topic in python it like a list.

bottom of page