class fishdef community(self)print(" am inside fish class"class mammaldef protect_mammal(self)print(" am inside mammal class "class goldfish(fishmammal)def protect_gf(self)print(" am inside goldfish class "obj=goldfish(creating an object of goldfish class obj community()obj protect_mammal(obj protect_gf(the fish class has method called community(that prints one lineand the mammal class has method called protect_mammal(that prints another line then we call both classes into the inheritance tuple this means that goldfish is inheriting from two-parent classes the object obj is set as goldfish object and can use the methods in both parent classes when we run the programwe'll see the following outputoutputi am inside fish class am inside mammal class am inside goldfish class the output shows that methods from both parent classes were effectively used in the child class multiple inheritances allow us to use the code from more than one parent class in child class if the same method is defined in multiple parent methodsthe child class will use the method of the first parent declared in its tuple list multilevel inheritance one can inherit form derived class too this is called multilevel inheritance in multilevel inheritancefeatures of the base class and the derived class is inherited into the new derived class page