Q2
How is a decorator defined in Python?
A.
Using the @decorator syntax
AnswerB.
By calling the decorator() function
C.
Using the def keyword
D.
Using the modify() keyword
Answer: Option A
Solution
Answer: Option A
Solution:
Decorators are defined using the @decorator_name syntax above a function definition.