
- Python Basic Tutorial
- Python - Home
- Python - Overview
- Python - Environment Setup
- Python - Basic Syntax
- Python - Comments
- Python - Variables
- Python - Data Types
- Python - Operators
- Python - Decision Making
- Python - Loops
- Python - Numbers
- Python - Strings
- Python - Lists
- Python - Tuples
- Python - Dictionary
- Python - Date & Time
- Python - Functions
- Python - Modules
- Python - Files I/O
- Python - Exceptions
How does issubclass() 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 issubclass() function to check the relationships of two classes and instances.
For example, the
issubclass(sub, sup)
boolean function returns true if the given subclass sub is indeed a subclass of the superclass sup.
- Related Articles
- How does isinstance() function work in Python?
- How does recursion function work in JavaScript?
- How does MySQL IF() function work?
- How does the bin2hex() function work in PHP?
- How does underscore "_" work in Python files?
- How does garbage collection work in Python?
- How does class inheritance work in Python?
- How does Overloading Operators work in Python?
- How does tuple comparison work in Python?
- How does ++ and -- operators work in Python?
- How does Python while loop work?
- How does a Python interpreter work?
- How does variable scopes work in Python Modules?
- How does [d+] regular expression work in Python?
- How does B regular expression work in Python?

Advertisements