One of the 50 questions in this topic
How much do you know about Python?A class variable is defined inside a class but outside any method, and is shared by all instances. It is accessed as Class.variable or self.variable (although the latter can create an instance variable if modified). They are useful for attributes that must be common to all objects, such as counters, settings, or constants. Modifying it affects all existing and future instances.