Multi-level Inheritance In Python Is Easy!🐍
HTML-код
- Опубликовано: 1 окт 2024
- PLEASE LIKE AND SUBSCRIBE ITS FREE!
#beginners #tutorial #python
Check out my other videos to learn more computer science & programming concepts please :)
Code used in the video will be pinned in the comments!
Socials and other platforms:
linktr.ee/Yous...
# 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()
🎉🎉🎉