其他分享
首页 > 其他分享> > 凯撒 密码

凯撒 密码

作者:互联网

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)

标签:item,else,凯撒,密码,chr,ord,password,original
来源: https://www.cnblogs.com/lzw2019114243036/p/15259945.html