Created
September 24, 2014 23:44
-
-
Save inky/fe56fdd2b7969b1e65b3 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 str_to_binary(a_string): | |
return ' '.join(format(ord(c), 'b').zfill(8) for c in a_string) | |
def ello_string(a_string): | |
return str_to_binary(a_string).replace('0', 'O').replace('1', 'L') | |
print ello_string('ello orld') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment