Q14
How does the @classmethod decorator differ from @staticmethod?
A.
@classmethod can't access class attributes
B.
@staticmethod can't access instance attributes
C.
@classmethod can access class attributes
AnswerD.
@staticmethod can access instance attributes
Answer: Option C
Solution
Answer: Option C
Solution:
The @classmethod decorator can access class attributes, while @staticmethod cannot.