Q5
What is a common use case of decorators?
A.
Replacing built-in functions
B.
Adding logging or authentication to functions
AnswerC.
Removing error handling from functions
D.
Changing the function's name
Answer: Option B
Solution
Answer: Option B
Solution:
Decorators are often used to add features like logging, authentication, or authorization to functions.