What is a class method?



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

Post New Answer

More Python Interview Questions

Explain how can you make a Python Script executable on Unix?

1 Answers  


What is the word for 6 times?

1 Answers  


What is __ init __( self in python?

1 Answers  


What is a palindrome number?

2 Answers  


What is python used for at google?

1 Answers  


Write a program to check whether the object is of a class or its subclass.

1 Answers  


which of the following is an invalid statement?

1 Answers  


Explain a few methods to implement functionally oriented programming in python?

1 Answers  


How does for loop and while loop differ in python and when do you choose to use them?

1 Answers  


We know python is all the rage these days. But to be truly accepting of a great technology, you must know its pitfalls as well. Would you like to talk about this?

1 Answers  


What is a static relationship?

1 Answers  


Do sheeps sleep?

1 Answers  


Categories