A

Admin • 832.27K Points
Coach

Q. Which of the following is used to create a static method?

  • (A) @staticmethod
  • (B) @class
  • (C) @staticmethods
  • (D) @static
  • Correct Answer - Option(A)
  • Views: 20
  • Filed under category Python
  • Hashtags:

Explanation by: Admin

The `@staticmethod` decorator is used to define a static method in a class.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.