Syntax

Report a typo

In the example below, we have two functions: decorate and func1. The first one can be used as a decorator.

def decorate(func):
    def wrapper():
        func()
        print('A decorated function')
        
    return wrapper


def func1():
    print('An ordinary function')

Which syntax construction should be added before func1 to apply the decorator to it?

Select one option from the list
___

Create a free account to access the full topic