Python, Programming, Data Science, Artificial Intelligence, Data.
fly(self): pass class Swimmable(ABC): @abstractmethod def swim(self): pass class Duck(Flyable, Swimmable): def fly(self): print("Duck is flying.") def swim(self): print("Duck is swimming.") class Airplane(Flyable): def fly(self): print("Airplane is flying.") duck = Duck() airplane = Airplane()