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
Post a Comment