aaaaaaaaaaaa
代码改变世界

python repr和str

2018-01-26 14:47  二进制乐谱  阅读(310)  评论(0编辑  收藏  举报

都是将对象转换为字符串

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

 

aaaaaaaaaaaaa