Abstract Class and Abstract Method in Python. Inheritance allows us to create (child) classes that are built upon existing (parent) classes. However, sometimes we don't want to create instances of a parent class. In that case, we can create an abstract base class with at least one abstract method. Abstract base classes cannot be instantiated, and abstract methods must be overridden. To create an abstract class in python, we need to use the abc module (abstract base class) and have a base class inherit ABC, and have at least one method with the abstractmethod decorator.
Source Code:
https://github.com/ImKennyYip/python-oop
Python Object Oriented Programming Playlist:
https://www.youtube.com/playlist?list=PLnKe36F30Y4Ykmi2jE28BZahMgPAV3Dzv
Python Data Structures and Algorithms Playlist:
https://www.youtube.com/playlist?list=PLnKe36F30Y4bcRomKi02sP9NR27KnBqCK
Python Game Programming Projects Playlist:
https://www.youtube.com/playlist?list=PLnKe36F30Y4bamRi07AOYS1qGDv_2MGMW
Subscribe for more coding tutorials !