from abc import ABC,abstractmethod class concrete(): @abstractmethod def w1(self): pass @abstractmethod def r1(self): pass class derived(concrete): def w1(self): self.a=10 def r1(self): print(self.a) D=derived() D.w1() D.r1()
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter