Header Ads

Responsive Ads Here

Lambda Function

 Lambda Function



# lambda function ---> Anonymous function

# def add(a,b):
#     return a+b

# print(add(2,3))

# a = lambda a,b: a + b
# print(a(2,3))

# print(add)
# print(a)


def even(num):
    return num % 2 == 0

print(even(4))


e = lambda num: num % 2 ==0
print(e(6))

Powered by Blogger.