PYnative

Python Programming

  • Learn Python
    • Python Tutorials
    • Python Basics
    • Python Interview Q&As
  • Exercises
    • Python Exercises
    • C Programming Exercises
    • C++ Exercises
  • Quizzes
  • Code Editor
    • Online Python Code Editor
    • Online C Compiler
    • Online C++ Compiler
Home » Python » Python Object-Oriented Programming (OOP) » Python Class Method vs. Static Method vs. Instance Method

Python Class Method vs. Static Method vs. Instance Method

Updated on: August 28, 2021 | 7 Comments

In this tutorial, you’ll understand the difference between class method vs. static method vs. instance method step by step.

In Object-oriented programming, when we design a class, we use the following three methods

  • Instance method performs a set of actions on the data/value provided by the instance variables. If we use instance variables inside a method, such methods are called instance methods.
  • Class method is method that is called on the class itself, not on a specific object instance. Therefore, it belongs to a class level, and all class instances share a class method.
  • Static method is a general utility method that performs a task in isolation. This method doesn’t have access to the instance and class variable.