Python Class Attr Vs Instance Attr

Ferdina Kusumah
Oct 4 · 2 min read

Explanation between class attribute and instance attribute

Photo by Victor on Unsplash

As an object-oriented language, Python provides two scopes for attributes: class attributes and instance attributes.

Class Attribute vs. Instance Attribute

  • An instance attribute is a Python variable belonging to one, and only one, object. This variable is only…