Created
September 8, 2012 14:10
-
-
Save tsbertalan/3675251 to your computer and use it in GitHub Desktop.
Change your name (or any string) to Bill Cosby speak!
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
#!/usr/bin/python | |
#http://cheezburger.com/4925161216 | |
parts = { | |
'a': 'Hip', 'b': 'Dip', 'c': 'Squoo', 'd': 'Bada', 'e': 'Meep', | |
'f': 'Bloo', 'g': 'Caw', 'h': 'Squee', 'i': 'Woobly', 'j': 'Badum', | |
'k': 'Loo', 'l': 'Derp', 'm': 'Nerp', 'n': 'Spee', 'o': 'Papa', | |
'p': 'Moom', 'q': 'Dub', 'r': 'Pa', 's': 'Naw', 't': 'Ka', | |
'u': 'Mim', 'v': 'Zap', 'w': 'Nup', 'x': 'Na', 'y': 'Yee', | |
'z': 'Zoop', ' ': ' ' | |
} | |
def cosbify(name): | |
name = list(name.lower()) | |
new_name = list('') | |
for letter in name: | |
new_name.append(parts[letter]) | |
return ''.join(new_name) | |
if __name__ == '__main__': | |
import sys | |
if len(sys.argv) > 1: | |
print cosbify(sys.argv[1]) | |
else: | |
print 'USAGE:' | |
print "$ python", sys.argv[0], "'Tom Bertalan'" | |
print cosbify('tom bertalan') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My roomate's name is PaWooblySquooSqueeHipPaBada. It's only fun if you say it out loud.