ascii函数

Posted shucomputerprogram

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ascii函数相关的知识,希望对你有一定的参考价值。

# 返回可打印的字符串,等价repr()函数

# ascii编码字符
print(ascii(learn python!))
print(ascii(9876543210))


# 非ascii编码字符,转换为x,u或U的Unicode编码
print(ascii(""))  # 中文
print(ascii("β"))  # 德文

 

 

更多:(未完结)

  

以上是关于ascii函数的主要内容,如果未能解决你的问题,请参考以下文章