python repr和str

都是将对象转换为字符串

repr

""" repr(object) -> string

Return the canonical string representation of the object.
For most object types, eval(repr(object)) == object. """

str区别在 eval(repr(object)) == object

原文地址:https://www.cnblogs.com/fply/p/8359477.html