Why would we want to declare a class that inherits from another class? python code example
Example: how to inherit a class in python
class Bird():
def eat(self):
print ("eating")
class Sparrow(Bird):
def sound(self):
print ("ChiChi!")
birdobj = Sparrow()
birdobj.eat()
birdobj.sound()