Return a lambda function : Function as Return « Function « Python






Return a lambda function

Return a lambda function

def action(x):
     return (lambda y: x + y)

act = action(99)
print act

print act(2)


           
       








Related examples in the same category

1.Function returns another functionFunction returns another function