How does issubclass() function work in Python?
Answers
Answered by
0
This function returns True if class is a subclass of classinfo.
A class is considered a subclass of itself. We can also pass a tuple of classes as the classinfo argument, in that case, the function will return True if class is a subclass of any of the classes in the tuple.
Since the object is the base class in Python, the function will return True if classinfo is passed as object class.
Similar questions