1. isinstance/issubclass/type *** issubclass 判断xxx类是否是xxx类的子类 class Animal: pass class Cat(Animal): pass class BoSiCat(Cat): passprint(issubclass(Cat, Animal)) # 判断第一个参数是否是第二个参数的后代print(issubclass(Animal, Cat))print(issubclass(BoSiCat, Animal)) # Tr…