repr(obj) 函数:将对象转化为供解释器读取的形式,返回一个对象的 string 格式。 如: import os print(repr(os.linesep)) #返回当前系统下的换行符 输出: ‘\r\n’