s = input('明文:') for c in s: print(chr(ord(c)+3),end='')
明文:i love you l#oryh#|rx Process finished with exit code 0
s = input('密文:') for c in s: print(chr(ord(c)-3),end='')
密文:l#oryh#|rx i love you Process finished with exit code 0
s = input('明文:') for c in s: print(chr(ord(c)+3),end='')
明文:i love you l#oryh#|rx Process finished with exit code 0
s = input('密文:') for c in s: print(chr(ord(c)-3),end='')
密文:l#oryh#|rx i love you Process finished with exit code 0
转载于:https://www.cnblogs.com/Millie/p/9079396.html