Computer Science, asked by sahoopk8164, 1 year ago

How I can check if A is superclass of B in Python?

Answers

Answered by pandeysakshi2003
0

class p1(object): pass

class p2(p1): pass

So p2 is the subclass of p1. Is there a way to find out programmatically that p1 is [one of] the superclass[es] of p2 ?

Similar questions