In [1]:
class Animal(object):
    def __init__(self):
        print('animal creator')
        
    def whoAmI(self):
        print('animal')
        
    def eat(self):
        print('eating')
        

class Dog(Animal):
    def __init__(self):
        Animal.__init__(self)
        print('dog created')
    
    def whoAmI(self):
        print('dog')
    
    def bark(self):
        print('woof')
        
        
a = Animal()
d = Dog()


animal creator
animal creator
dog created

In [2]:
d.bark()
a.whoAmI()
d.whoAmI()


woof
animal
dog

In [ ]: