Learn Python DECORATORS in 7 minutes!

9 Views
Published
# Decorator = A function that extends the behavior of another function
# w/o modifying the base function
# Pass the base function as an argument to the decorator

def add_sprinkles(func):
def wrapper(*args, **kwargs):
print("*You add sprinkles
Category
Bro Code
Tags
Python tutorial, python course, python programming
Be the first to comment