

$ python lambda.py wordword
10
Here, we use a function make_repeater to create new function objects at runtime and return it. A lambda statement is used to create the function object. Essentially, thelambda takes a parameter followed by a single expression only which becomes the body of the function and the value of this expression is returned by the new function. Note that even aprint statement cannot be used inside a lambda form, only expressions.