1. Home
  2. Data Science
  3. Python
  4. Which function checks whether a class inherits from…

Added 25 Nov 2026

Which function checks whether a class inherits from another in Python?

  1. issubclass() Correct answer
  2. isparent()
  3. inherits()
  4. subclassof()

Correct answer

A. issubclass()

6 views

MCQSEXAM

Explanation

issubclass(C, B) tests inheritance relationships.

Reference

Asked in: Python Interview OOP

https://docs.python.org/3/tutorial/classes.html

Preparing for an exam?

Doubts & discussion

Not sure why the answer is A? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Python MCQs

Practise all Python MCQs

Similar MCQs