R

Ram Sharma • 3.40K Points
Extraordinary

Q. What is true about the `@staticmethod` decorator?

  • (A) It allows access to `self`
  • (B) It doesn't take any implicit first argument
  • (C) It takes `cls` as the first argument
  • (D) It creates a private method
  • Correct Answer - Option(B)
  • Views: 3
  • Filed under category Python
  • Hashtags:

Explanation by: Ram Sharma
Static methods don't take `self` or `cls` as the first argument.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.