python中如何打印object对象的属性值?

如题所述

第1个回答  2012-03-06
def prn_obj(obj):
print ', '.join(['%s:%s' % item for item in obj.__dict__.items()])
相似回答