抱歉,您的浏览器无法访问本站
本页面需要浏览器支持(启用)JavaScript
了解详情 >

Python ASCII 字符串 转换

ASCII转字符

ASCII转字符.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
def ASCIItostr():
try:
s = input()
s=s.split()
for i in s:
print(chr(int(i)),end="")
print()
except Exception as e:
print("",end="")

if __name__ == '__main__':

try:
while True:
ASCIItostr()
except EOFError:
exit()

字符转ASCII

字符转ASCII.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
def strtoASCII():
try:
s = input()
for i in s:
print(ord(str(i)),end=" ")
print()
except Exception as e:
print("",end="")

if __name__ == '__main__':

try:
while True:
strtoASCII()
except EOFError:
exit()

留言区

This is a picture without description
This is a picture without description