Advertisement
ClearCode

Functions basics

May 5th, 2022
761
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. def func():
  2.     print('Function')
  3.  
  4. def wrapper(func):
  5.     print('hello')
  6.     func()
  7.     print('goodbye')
  8.  
  9. def function_generator():
  10.     def new_function():
  11.         print('New function')
  12.     return new_function
  13.  
  14. new_func = function_generator()
  15. new_func()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement