for property, value in vars(theObject).items(): print(property, ":", value)
Be aware that in some rare cases there's a __slots__ property, such classes often have no __dict__.
__slots__
__dict__
1.4m articles
1.4m replys
5 comments
57.0k users