Vidyalelo
Python · Q21

Decorators in Depth

Programming · Python · question 21

Q21

How can you remove a decorator from a function in Python?

A.
By deleting the decorator's code
B.
By using the @remove_decorator syntax
C.
By using the @decorator syntax again
Answer
D.
By calling the remove_decorator() function

Answer: Option C

Solution

Answer: Option C
Solution:
You can remove a decorator by removing the @decorator syntax from the function.