Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from string import ascii_lowercase as alphabet
- code_string = input().lower()
- code_key = input()
- # table = str.maketrans(code_key, alphabet)
- # print(code_string.translate(table))
- decode_string = ''
- for sign in code_string:
- if sign in code_key:
- idx = code_key.index(sign)
- decode_string += alphabet[idx]
- else:
- decode_string += sign
- print(decode_string)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement