πŸ“Š Python
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

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