字符转化为ASCII

Python提供了ord和chr两个内置的函数,用于字符与ASCII码之间的转换。
>>> print ord('a')
97
>>> print chr(97)
a

猜你喜欢

转载自www.cnblogs.com/liangying666/p/9167974.html