This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def solution(x): | |
encrypted_message_characters = list(x) | |
decrypted_message_characters = [] | |
lowercase_characters = [chr(i) for i in range(ord('a'), ord('z') + 1)] | |
for character in encrypted_message_characters: | |
if(character in lowercase_characters): | |
decrypted_message_characters.append(lowercase_characters[len(lowercase_characters) - 1 - lowercase_characters.index(character)]) | |
else: | |
decrypted_message_characters.append(character) |