print '%r'% example. <Demo>(repr). 如果想要在类中实现,可以直接重载__repr__和__str__. 简单了解format(我使用的环境是python2.7),可能是3才有的 ...
確定! 回上一頁