What is Python Class Attribute?
A Python class attribute is a variable that is shared among all instances of a class. Unlike instance attributes, which are unique to each object created from the class, class attributes are defined within the class body and are accessed using the class name or through an instance. They are useful for storing constants or properties that should be consistent across all instances. Class attributes can be modified, but changes will affect all instances unless overridden by instance attributes. This feature promotes efficient memory usage and helps maintain shared state across multiple objects.