ascii函数

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

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


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

更多:(未完结)

  

猜你喜欢

转载自www.cnblogs.com/ShuComputerProgram/p/10339521.html