Last active
August 29, 2015 14:16
-
-
Save JetStarBlues/07313b02e60b25dd43bc to your computer and use it in GitHub Desktop.
conversion example...
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
# Dubious ... may be hard for person to read... but for computer both identical... | |
chars = 'AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz0123456789!-.~@' | |
html = [ | |
'A','a','B','b','C','c','D','d','E','e','F','f','G', | |
'g','H','h','I','i','J','j','K','k','L','l','M','m', | |
'N','n','O','o','P','p','Q','q','R','r','S','s','T', | |
't','U','u','V','v','W','w','X','x','Y','y','Z','z', | |
'0','1','2','3','4','5','6','7','8','9','!','-','.','~','@' | |
] | |
def convert(c): | |
return html[chars.index(c)] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment