What will be the output of the following Python code?

class Parent(object):
    def display(self):
        print('Parent')

class Child(Parent):
    def display(self):
        print('Child')

p=Parent()
p.display()
c=Child()
c.display()

 

Parent Child
Child Parent
Parent
Child
Verified Answer
Correct Option - a

To get all Infosys Certified Python Programmer Exam questions Join Telegram Group https://rebrand.ly/lex-telegram-236dee

Telegram