isinstance()
isinstance()
isinstance()
isinstance()
Parameters
isinstance()
ParametersThe isinstance()
takes two parameters:
object
-object
to be checkedclassinfo
- class, type, or tuple of classes and types
Return Value from isinstance()
isinstance()
The isinstance()
returns:
True
if theobject
is aninstance
or subclass of a class, or any element of the tupleFalse
otherwise
If classinfo
is not a type or tuple of types, a TypeError
exception is raised.
Output:
References
Last updated