A

Admin • 833K Points
Coach

Q. Which decorator is used to create a class method?

  • (A) @classmethod
  • (B) @staticmethod
  • (C) @property
  • (D) @class
  • Correct Answer - Option(A)
  • Views: 33
  • Filed under category Python
  • Hashtags:

Explanation by: Admin

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

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.