python anstract class code example
Example 1: abstract method python
from abc import ABC, abstractmethod
class AbstractClassExample(ABC):
def __init__(self, value):
self.value = value
super().__init__()
@abstractmethod
def do_something(self):
pass
Example 2: abstarct class python
from abc import ABC
class MyABC(ABC):
pass