인터페이스
추상 클래스
from abc import ABC, abstractmethod
class AbstractClassExample(ABC):
@abstractmethod def do_something(self):
passclass AbstractClassExample2(ABC):
@abstractmethod def do_something2(self):
pass# 상속받은 객체의 메소드를 반드시 구현 해야함class ConcreteClassExample(AbstractClassExample, AbstractClassExample2):
def do_something(self):
return "The concrete class is doing something" def do_something2(self):
return "The concrete class is doing something2"cls = ConcreteClassExample()
print(cls.do_something())