Given a string, write a program to mirror the characters of the string in alphabetical order to create a secret message.
letters = 'abcdefghijklmnopqrstuvwxyz'
table = {}
for i, j in zip(letters, letters[::-1]):
table[ord(i)] = j
s = input('Input string: ').lower()
s = s.translate(table)
print(s)
Comments
Leave a comment