Python Programming - Functions - Discussion

Discussion Forum : Functions - General Questions (Q.No. 53)
53.
What is the purpose of the staticmethod decorator?
To create static methods that can be called on class instances.
To define methods with default arguments.
To create methods that only work on static variables.
To convert a function to a class method.
Answer: Option
Explanation:
The staticmethod decorator in Python is used to create static methods that can be called on class instances.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.