Home / MCQ Bank / Computer
Computer Classes And Objects In Python

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

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option A • It defines a method that belongs to the class and not the instance

Related Computer Questions

What is the main advantage of using polymorphism in object-oriented programming? What is the advantage of using asynchronous programming in C#? Which property in the Window object is used to refer to a Location object? Which of these is a correct way to generate numbers between 0 to 1(inclusive) randomly? What will be the output of the following C code? #include <stdio.h> int main() { short int i; scanf("%h*d", &i); printf("%hd", i); return 0; }