πŸ“Š Python
Q. Which decorator is used to create a class method?
  • (A) @classmethod
  • (B) @staticmethod
  • (C) @property
  • (D) @class
πŸ’¬ Discuss
βœ… Correct Answer: (A) @classmethod

Explanation: The `@classmethod` decorator defines a method that takes `cls` as the first argument.

Explanation by: Mr. Dubey
The `@classmethod` decorator defines a method that takes `cls` as the first argument.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
48
Total Visits
πŸ“½οΈ
8 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
80%
Success Rate