Created
January 4, 2011 19:29
-
-
Save beniwohli/765262 to your computer and use it in GitHub Desktop.
A Python dictionary mapping the Unicode codes of the greek alphabet to their names
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
greek_alphabet = { | |
u'\u0391': 'Alpha', | |
u'\u0392': 'Beta', | |
u'\u0393': 'Gamma', | |
u'\u0394': 'Delta', | |
u'\u0395': 'Epsilon', | |
u'\u0396': 'Zeta', | |
u'\u0397': 'Eta', | |
u'\u0398': 'Theta', | |
u'\u0399': 'Iota', | |
u'\u039A': 'Kappa', | |
u'\u039B': 'Lamda', | |
u'\u039C': 'Mu', | |
u'\u039D': 'Nu', | |
u'\u039E': 'Xi', | |
u'\u039F': 'Omicron', | |
u'\u03A0': 'Pi', | |
u'\u03A1': 'Rho', | |
u'\u03A3': 'Sigma', | |
u'\u03A4': 'Tau', | |
u'\u03A5': 'Upsilon', | |
u'\u03A6': 'Phi', | |
u'\u03A7': 'Chi', | |
u'\u03A8': 'Psi', | |
u'\u03A9': 'Omega', | |
u'\u03B1': 'alpha', | |
u'\u03B2': 'beta', | |
u'\u03B3': 'gamma', | |
u'\u03B4': 'delta', | |
u'\u03B5': 'epsilon', | |
u'\u03B6': 'zeta', | |
u'\u03B7': 'eta', | |
u'\u03B8': 'theta', | |
u'\u03B9': 'iota', | |
u'\u03BA': 'kappa', | |
u'\u03BB': 'lamda', | |
u'\u03BC': 'mu', | |
u'\u03BD': 'nu', | |
u'\u03BE': 'xi', | |
u'\u03BF': 'omicron', | |
u'\u03C0': 'pi', | |
u'\u03C1': 'rho', | |
u'\u03C3': 'sigma', | |
u'\u03C4': 'tau', | |
u'\u03C5': 'upsilon', | |
u'\u03C6': 'phi', | |
u'\u03C7': 'chi', | |
u'\u03C8': 'psi', | |
u'\u03C9': 'omega', | |
} |
Awesome! Thank you! I broke it into 2 variables for upper and lower cases.
Thanks! A big saver!
Awesome!, Very helpful, thank you!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@fishwithlaser you can easily invert the dictionary like so:
Note that this only works because there is a 1:1 relation between keys and values. If there were multiple keys with the same value, you'd lose data.