Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Explain the difference between `@staticmethod` and `@classmethod`.



Explain the difference between `@staticmethod` and `@classmethod`...

Answer / nashiinformaticssolutions

`@staticmethod` is used for methods that don’t require access to the instance (`self`) or class (`cls`). `@classmethod` is used when a method needs access to the class (`cls`), but not the instance (`self`).

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Python Interview Questions

What does the continue do in python?

0 Answers  


What is the best code you can write to swap two numbers?

0 Answers  


What is tuple?

0 Answers  


Is python a procedural language?

0 Answers  


What is super () react?

0 Answers  


What are python scripts used for?

0 Answers  


What is the use of enumerate() in python?

0 Answers  


What is the output of print str[4: ] if str = ‘ python language’?

0 Answers  


Explain accessor and mutator methods in python?

0 Answers  


What is anonymous function or lambda function?

0 Answers  


Write a program to produce fibonacci series in python.

0 Answers  


What is web scraping?

0 Answers  


Categories