今天遇见了这个函数,查找一下用法
示例如下
val = 'A'
print("ASCII code of ", val, " is = ", ord(val))
val = 'x'
print("ASCII code of ", val, " is = ", ord(val))
val = '@'
print("ASCII code of ", val, " is = ", ord(val))
val = '8'
print("ASCII code of ", val, " is = ", ord(val))