Skip to content

Instantly share code, notes, and snippets.

@gelendir
Created October 31, 2013 03:02
Show Gist options
  • Save gelendir/7243798 to your computer and use it in GitHub Desktop.
Save gelendir/7243798 to your computer and use it in GitHub Desktop.
Convert to samurai name
letters = {
'a': 'ka',
'b': 'zu',
'c': 'mi',
'd': 'te',
'e': 'ku',
'f': 'lu',
'g': 'ji',
'h': 'ri',
'i': 'ki',
'j': 'zu',
'k': 'me',
'l': 'ta',
'm': 'rin',
'n': 'to',
'o': 'mo',
'p': 'no',
'q': 'ke',
'r': 'shi',
's': 'ari',
't': 'chi',
'u': 'do',
'v': 'ru',
'w': 'mei',
'x': 'na',
'y': 'fu',
'z': 'zi',
}
name = "gregory eric sanderson turcot temlett macdonnell glengary forbes linden"
print("".join(letters[x] if x in letters else x for x in name))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment