class Foo: pass obj = Foo() isinstance(obj,Foo) class Foo: pass obj = Foo() isinstance(obj ,Foo) print(obj) class Foo: pass class Bar(Foo): pass issubclass(Bar,Foo) print(Bar)