What is a class method?
Answer / Roopali Sharma
A 'class method' (often called static method) in Python is a method that belongs to the class, not to any specific instance of the class. It can be called without creating an instance of the class and it does not have access to 'self'. Class methods are typically used for operations that do not require a specific instance.
| Is This Answer Correct ? | 0 Yes | 0 No |
How do I run a python script in windows?
Does Python support enums?
Why python is a dynamic language?
What are the differences in list and tuple?
Tell me what's the process to get the home directory using ‘~' in python?
Do you know the number of keywords in python?
How does python compare string and int?
Is python is better than java?
Is python pure object oriented programming ?
Why is epoch 1970?
Should I learn r or python first?
What is the use of enumerate() in python?