class Base:
pass
class Derived1(Base):
pass
class Derived2(Derived1):
pass
Derived1
is derived from Base
, and Derived2
is derived from Derived1
.
>>> class Website:
def first(self):
print ('freetimelearning.com')
>>> class Second(Website):
def sec(self):
print ('www.freetimelearning.com')
>>> class Third(Second):
def final(self):
print ('www.freetimelearn.com')
>>> a=Third()
>>> a.first()
freetimelearning.com
>>> a.sec()
www.freetimelearning.com
>>> a.final()
www.freetimelearn.com
>>>