c=input("请输入一个字符:")
a=int(input("请输入一个ascii码:"))
print(c+"的ascii的码为:",ord(c))
print(a,"对应的字符为:",chr(a))
02-13
1450
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
c=input("请输入一个字符:")
a=int(input("请输入一个ascii码:"))
print(c+"的ascii的码为:",ord(c))
print(a,"对应的字符为:",chr(a))