Is there a built-in function to print all the current properties and values of an object?

You want vars() mixed with pprint():

from pprint import pprint
pprint(vars(your_object))

posted @ 2024-12-09 08:43  ChrainY  阅读(14)  评论(0)    收藏  举报