Q13
What is the role of the @staticmethod decorator in Python?
A.
To define static variables
B.
To make a method callable without an instance
AnswerC.
To add static typing to variables
D.
To prevent method overriding
Answer: Option B
Solution
Answer: Option B
Solution:
The @staticmethod decorator allows a method to be called without creating an instance of the class.