凯撒 密码

original = input()
password = ''
for item in original:
if item.isalpha():
if item in ['x', 'y', 'z', 'X', 'Y', 'Z']:
password = password + chr(ord(item) - 23)
else:
password = password + chr(ord(item) + 3)
else:
password = password + item
print(password)

凯撒 密码

上一篇:栈-1544-整理字符串


下一篇:Python ord 函数 - Python零基础入门教程