Last active
October 25, 2016 08:32
-
-
Save anddam/f591520018a1067d50d0f39820622d09 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 garble_text(text): | |
| '''Somehow garble text, swaps | |
| a <=> z, b <=> y, c <=> x, etc | |
| ''' | |
| replace_string = 'abcdefghijklm nopqrstuvwxyz' | |
| replace_dict = {key: value for key, value in zip(replace_string, reversed(replace_string))} | |
| result = '' | |
| for char in text: | |
| result += replace_dict[char] | |
| return result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment