sally constructed jim constructed sally party count jim party count sally party count inheritance another powerful feature of object-oriented programming is the ability to create new class by extending an existing class when extending classwe call the original class the parent class and the new class the child class for this examplewe move our partyanimal class into its own file thenwe can 'importthe partyanimal class in new file and extend itas followsfrom party import partyanimal class cricketfan(partyanimal)points def six(self)self points self points self party(print(self name,"points",self pointss partyanimal("sally" party( cricketfan("jim" party( six(print(dir( )codewhen we define the cricketfan classwe indicate that we are extending the partyanimal class this means that all of the variables (xand methods (partyfrom the partyanimal class are inherited by the cricketfan class for examplewithin the six method in the cricketfan classwe call the party method from the partyanimal class as the program executeswe create and as independent instances of partyanimal and cricketfan the object has additional capabilities beyond the object sally constructed sally party count jim constructed jim party count jim party count jim points ['__class__''__delattr__''__weakref__''name''party''points''six'' '