1. Home
  2. Data Science
  3. Python
  4. Which function checks whether an object is an instance of…

Added 25 Nov 2026

Which function checks whether an object is an instance of a class in Python?

  1. typeof()
  2. instanceof()
  3. is_a()
  4. isinstance() Correct answer

Correct answer

D. isinstance()

7 views

MCQSEXAM

Explanation

isinstance(obj, cls) returns True if obj is an instance of cls or a subclass.

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 D? 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