Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def print_my_name(name):
- print(f'My name is {name}')
- nm = 'Teodor"
- output:
- My name is Teodor
- ###################################
- def decorate_it(function):
- def wrap_it(arg):
- print('Adding more')
- func(arg)
- print('Adding more')
- return wrap_it
- nm = 'Teodor'
- @decorate_func
- def print_my_name(name):
- print(f'My name is {name}')
- print_my_name(nm)
- output:
- Adding more
- My name is Teodor
- Adding more
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement