Last active
November 23, 2020 14:57
-
-
Save 4383/3713d90485102154c165b19a6601e936 to your computer and use it in GitHub Desktop.
Python ROT13 converter / deconverter
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
import string #fixed typo was using | |
text = str(input('tip your text to convert: ', )) | |
rot13 = string.maketrans( | |
"ABCDEFGHIJKLMabcdefghijklmNOPQRSTUVWXYZnopqrstuvwxyz", | |
"NOPQRSTUVWXYZnopqrstuvwxyzABCDEFGHIJKLMabcdefghijklm") | |
string.translate(text, rot13) | |
# Example | |
# 'Hello World! | |
# 'Uryyb Jbeyq! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
yes I know. I was searching for a similar thing and found your code and struggled a little bit with it. So I decided to give a comment, how to get it working.