凯撒密码b

t = input()
for i in t:
if (ord('a') <= ord(i) <= ord('z')):
t = chr(ord('a')+(ord(i)-ord('a')+3)%26)
print(t,end='')
elif (ord('A') <= ord(i) <= ord('Z')):
t = chr(ord('A')+(ord(i)-ord('A')+3)%26)
print(t,end='')
else:
t = i
print(t,end='')

原文地址:https://www.cnblogs.com/kwjl/p/12555115.html