您的位置:首页 > 编程语言 > Python开发

python函数chr()

2016-03-18 13:25 561 查看


chr(i)

中文说明:

返回整数i对应的ASCII字符。与ord()作用相反。

参数x:取值范围[0, 255]之间的正数。

版本:该函数在python2和python3各个版本中都可用。不存在兼容性问题。

英文说明:

Return a string of one character whose ASCII code is the integer i. For example, chr(97) returns the string 'a'. This is the inverse of ord(). The argument must be in the range [0..255], inclusive; ValueError will be raised if i is outside that range. See also
unichr().

代码实例

来源:http://www.pythontab.com/html/2013/hanshu_0128/181.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: