Vidyalelo
Python · Q39

Classes and Objects in Python

Programming · Python · question 39

Q39

What is the purpose of the @classmethod decorator in Python classes?

A.
It defines a method that belongs to the class and not the instance
Answer
B.
It defines a static method
C.
It defines a constructor
D.
It defines a destructor

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board