Q16
What is the purpose of the @classmethod decorator in Python?
A.
To define a class method
AnswerB.
To define an instance method
C.
To define a static method
D.
To define a constructor method
Answer: Option A
Solution
Answer: Option A
Solution:
The @classmethod decorator is used to define a method that operates on the class and not just instances.