lambda:
lamda suction take take any type of arguments
syntax:
lambda arguments: expression
example:
x = lambda a:a+50
print(x(12))
x = lambda a ,b: a*b
print(x(20,2))
x = lambda a,b,c,d : a-b*c+d
print(x(20,2,2,15))
outout:
No comments:
Post a Comment