instance
An instance is a concrete occurrence of a class—a unique object created using a class as its template. When you create an instance, you build a new object from the class, with its own set of data attributes.
Classes typically define an .__init__() method to set up the initial state of each instance. Each instance holds its own independent data, so changes to one instance don’t affect others.
Example
Calling the Dog class twice creates two separate instances, each with its own name:
>>> class Dog:
... def __init__(self, name):
... self.name = name
...
>>> spot = Dog("Spot")
>>> rex = Dog("Rex")
>>> spot.name
'Spot'
>>> rex.name
'Rex'
Each Dog instance has its own .name attribute. You can check whether an object is an instance of a class using isinstance():
>>> isinstance(spot, Dog)
True
Related Resources
Tutorial
Python Class Constructors: Control Your Object Instantiation
In this tutorial, you'll learn how class constructors work in Python. You'll also explore Python's instantiation process, which has two main steps: instance creation and instance initialization.
For additional information on related topics, take a look at the following resources:
- Python's Instance, Class, and Static Methods Demystified (Tutorial)
- Object-Oriented Programming (OOP) (Learning Path)
- Class Concepts: Object-Oriented Programming in Python (Course)
- Using Python Class Constructors (Course)
- Python Class Constructors: Control Your Object Instantiation (Quiz)
- OOP Method Types in Python: @classmethod vs @staticmethod vs Instance Methods (Course)
- Python's Instance, Class, and Static Methods Demystified (Quiz)
Have a question about this? Mentor AI can show you examples, compare related terms, and point you to tutorials.
By Dan Bader • Updated Nov. 9, 2026