您的位置:首页 > 移动开发 > Objective-C

Python标准库:内置函数repr(object)

2015-03-14 11:17 288 查看
本函数是返回对象object的详细说明字符串。
例子:
#repr()

print(repr(range(5)))
print(repr(help))
print(repr(0x200))
print(repr([2,4,5]))


结果输出如下:
range(0, 5)
Type help() for interactive help, or help(object) for help about object.
512
[2, 4, 5]


蔡军生 QQ:9073204 深圳
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: