Share
call nested lambda
Question
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
How will you call this function?
def multiply(x):
return lambda y : y*x
Answer ( 1 )
a=multiply(7)
print(a(8))
P=multiply(7)
print(p(8))
step 1). pass_x=multiply(5) #this will give the output mentioned in step2
step2). pass_x=lambda y: y*5
step3).pass y to to lambda function .pass_x(3)
step4).pass_x= lambda y: 3*5
step5). answer will be 243.