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

  • (A) @staticmethod
  • (B) @class
  • (C) @staticmethods
  • (D) @static
πŸ’¬ Discuss
βœ… Correct Answer: (A) @staticmethod
Explanation: The `@staticmethod` decorator is used to define a static method in a class.
Explanation by: Mr. Dubey
The `@staticmethod` decorator is used to define a static method in a class.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
88
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
86%
Success Rate