What is a decorator in Python?
A decorator is a function that takes another function, adds some extra behavior, and returns a new function. You use it when you want to add common logic, like logging, timing, authentication or validation, without changing the original function code.
#pythoninterview #pythondecorator #pythonjobprep #pythoncodinginterview #pythonpeak #pythonquestions #juniorpython #pythonconcepts #decorators #pythonprogramming