Vidyalelo
Python · Q3

Decorators in Depth

Programming · Python · question 3

Q3

What is the primary purpose of using decorators?

A.
To reduce code complexity
B.
To replace existing functions
C.
To add functionalities to functions
Answer
D.
To remove functionalities from functions

Answer: Option C

Solution

Answer: Option C
Solution:
Decorators are used to add or modify functionalities of functions without changing their code.