Question OOP-INH-0040
EasyWhat is the output of this code?
class Animal:
pass
class Dog(Animal):
pass
print(isinstance(Dog(), Animal))
- A.
True
- B.
Dog
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Inheritance question
What is the output of this code?
class Animal:
pass
class Dog(Animal):
pass
print(isinstance(Dog(), Animal))
True
Dog
Sign up free to see the answer and a step-by-step explanation.
False
Error