this is inheritancethis example istechnicallyno different from our very first example in objects in pythonsince python automatically inherits from object if we don' explicitly provide different superclass superclassor parent classis class that is being inherited from subclass is class that is inheriting from superclass in this casethe superclass is objectand mysubclass is the subclass subclass is also said to be derived from its parent class or that the subclass extends the parent as you've probably figured out from the exampleinheritance requires minimal amount of extra syntax over basic class definition simply include the name of the parent class inside parentheses after the class name but before the colon terminating the class definition this is all we have to do to tell python that the new class should be derived from the given superclass how do we apply inheritance in practicethe simplest and most obvious use of inheritance is to add functionality to an existing class let' start with simple contact manager that tracks the name and -mail address of several people the contact class is responsible for maintaining list of all contacts in class variableand for initializing the name and address for an individual contactclass contactall_contacts [def __init__(selfnameemail)self name name self email email contact all_contacts append(selfthis example introduces us to class variables the all_contacts listbecause it is part of the class definitionis shared by all instances of this class this means that there is only one contact all_contacts listwhich we can access as contact all_ contacts less obviouslywe can also access it as self all_contacts on any object instantiated from contact if the field can' be found on the objectthen it will be found on the class and thus refer to the same single list be careful with this syntaxfor if you ever set the variable using self all_contactsyou will actually be creating new instance variable associated only with that object the class variable will still be unchanged and accessible as contact all_contacts