The syntax of issubclass() is:
issubclass(class, classinfo)
issubclass() Parameters
issubclass() takes two parameters:
- class - class to be checked
- classinfo - class, type, or tuple of classes and types
Return Value from issubclass()
issubclass() returns:
Trueif class is subclass of a class, or any element of the tupleFalseotherwise
Example: How issubclass() works?
Output
True False True True
It's important to note that class is considered a subclass of itself.