- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How does isinstance() function work in Python?
We can derive a class from multiple parent classes as follows −
class A: # define your class A ..... class B: # define your class B ..... class C(A, B): # subclass of A and B .....
We can use isinstance() function to check the relationships of two classes and instances.
boolean function returns true if obj is an instance of class Class or is an instance of a subclass of Class
- How does issubclass() function work in Python?
- How does MySQL IF() function work?
- How does the bin2hex() function work in PHP?
- How does Python while loop work?
- How does tuple comparison work in Python?
- How does mkdir -p work in Python?
- How does ++ and -- operators work in Python?
- How does garbage collection work in Python?
- How does class inheritance work in Python?
- How does Overloading Operators work in Python?
- Type and isinstance in Python
- How does Python dictionary keys() Method work?
- How does MySQL QUOTE() function work with comparison values?
- How does [d+] regular expression work in Python?