Decorators
python
dev.to
A decorator is a function that modifies the behavior of another function. Syntax: def decorator_function(original_function): def wrapper_function(): # Code to execute before the original function original_function() # Code to execute after the original function return wrapper_function @decorator_function def display(): print("Display function executed.") display()