1import abc
2class Shape(metaclass=abc.ABCMeta):
3 @abc.abstractmethod
4 def area(self):
5 pass
6class Rectangle(Shape):
7 def __init__(self, x,y):
8 self.l = x
9 self.b=y
10 def area(self):
11 return self.l*self.b
12r = Rectangle(10,20)
13print ('area: ',r.area())