- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- 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 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.
Advertisements