🚩 카이사르 암호
cipher = 'IJATYJ UFQFHJ GZXNSJXX XNLMY'
alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
numcipher = []
for char in cipher:
if char != ' ':
numcipher.append(alpha.index(char))
else:
numcipher.append(' ')
for i in range(len(alpha)):
for j in range(len(cipher)):
if numcipher[j] != ' ':
print(alpha[(numcipher[j] - i) % 26], end='')
else:
print(' ', end='')
print('')
공백 문자 처리를 잘 해야한다.