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

本函数是返回对象object的详细说明字符串。

例子:

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

结果输出如下:

range(0,5)

Typehelp()forinteractivehelp,orhelp(object)forhelpaboutobject.

512

[2,4,5]

蔡军生 QQ:9073204 深圳

,记忆像是倒在手心里的水,不论是摊平还是握紧,

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

相关文章:

你感兴趣的文章:

标签云: