一.isinstance和issubclass class Foo: pass class Son(Foo): pass s = Son() #判断一个对象是不是这个类的对象,传两个参数(对象,类) # print(isinstance(s,Son)) # print(isinstance(s,Foo)) # print(type(s) is Son) # print(type(s) is Foo) #判断一个类是不是另一类的子类,传两个参数(子类,父类) print(issubclass(So