easy_encode_decode

python学习网 2017-12-06 09:00:02
1 s = input("输入:")
2 result = ''
3 for i in range(len(s)):
4     result += chr(ord(s[i])^2000)
5 print(result)
View Code

ord(char)    #把字符转换成unicode编码(整型)

chr(unicode)  #把unicode转换成字符

 

阅读(759) 评论(0)