Python issubclass() Function

The issubclass() function in Python returns a boolean value ‘True’ if the given object is a subclass of classinfo, else it returns False.

Syntax

Parameter

class: It is a required parameter which represents a tuple of class objects.

classinfo: This parameter represents a type or a class, or a tuple of types and/or classes

Return

This function returns True if the given object is a subclass of the specified object, else it returns False.

Example 1

Output

Example 2

Output

Pin It on Pinterest

Share This