
def w(func):
    def wrapper():           # This function is LOCAL to w( )
        print("Started")
        func()
        print("Ended")

    return wrapper     	     # Returns a function !

# Instead of writing:
def f1():
    print("Hello")

f1 = w(f1)      # Pass f1 to w() and receive a NEW function f2

f1()

# We can write: ("decorator notation")
@w
def f2():
    print("Hello")

f2()
