I'm working on a little script to help me learn the Japanese Kana (Hiragana/Katakana). In total, there are probably 100+ (+||-).
Basically, all it would do is take in the english version and convert it to the character.
ie. a = 'あ' which is 12354 in decimal
What I have so far is this:
hiraDict = { "a" : 12354, "i" : 12356 ...}
if __name__ == "__main__":
if hiraDict.has_key(sys.argv[1]):
print(unichr(hiraDict[sys.argv[1]]))
With 100+ characters, would this work OK or is there a better way to approach this?