Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def inner_echo(word1, closure):
- return word1 * closure['n']
- def echo(multiplier)
- closure = { 'n': multiplier }
- return inner_echo, closure
- twice, twice_closure = echo(2)
- print(twice('hello', twice_closure))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement