Lambda or anonymous function

#lambda is another way to make function

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

minus= lambda x,y : x-y #we made a function using lambda.

def minus(x,y):#we made this function without lambda but both are same
return x-y

print(minus(5,2))

Comments

Popular posts from this blog

Steps taken by a compiler to execute a C program

Tokens in C

Variables and Data Types in C