# multi-level inheritance = when a child class inherits from another child class class Car: working = True class Chevy(Car): def drive(self): print("This car is driving") class Corvette(Chevy): def race(self): print("This corvette is fast") corvette = Corvette() print(corvette.working) corvette.drive() corvette.race()
# multi-level inheritance = when a child class inherits from another child class
class Car:
working = True
class Chevy(Car):
def drive(self):
print("This car is driving")
class Corvette(Chevy):
def race(self):
print("This corvette is fast")
corvette = Corvette()
print(corvette.working)
corvette.drive()
corvette.race()
🎉🎉🎉