小白教程
所有教程
关于
Search
172.69.58.252
172.69.58.252
参数设置
贡献
退出
操作
编辑
移动
保护
信息
历史
删除
查看“Python3 func ascii”的源代码
本页内容
上一节:
Python3_func_sorted
下一节:
Python3_func_enumerate
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{DISPLAYTITLE:ascii()}}[[Category:python3 built in functions|15]] = Python3 ascii() 函数 = [[python3 built in functions|Python3 内置函数]] == 描述 == ascii() 函数类似 repr() 函数, 返回一个表示对象的字符串, 但是对于字符串中的非 ASCII 字符则返回通过 repr() 函数使用 \x, \u 或 \U 编码的字符。 生成字符串类似 Python2 版本中 repr() 函数的返回值。 == 语法 == 以下是 ascii() 方法的语法: <sample title="" desc="" lang="python" hererun="1"> ascii(object) </sample> == 参数 == * object -- 对象。 == 返回值 == 返回字符串。 以下展示了使用 ascii() 方法的实例: <sample title="" desc="" lang="python" hererun="1"> >>> ascii('xiaobai') "'xiaobai'" </sample> [[python3 built in functions|Python3 内置函数]]
返回至“
Python3 func ascii
”。
上一节:
Python3_func_sorted
下一节:
Python3_func_enumerate