Multiple Inheritance in Python

Source code :

class learner:
    status="python"
    def __init__(self):
        print("learner")
class beginner:
    learn=" learn python"
    def __init__(self):
        print("beginner")
class tutor(learner,beginner):
    def __init__(self):
        print("tutor")
tutor=tutor()
print(tutor.status+tutor.learn)

Output :

tutor
python learn python

Output :


                

Comments :