Created
September 22, 2013 23:02
-
-
Save bmallin/6664705 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 letter_index(letter): | |
| letter_ord = ord(letter) | |
| if letter_ord >= 65 and letter_ord <= 90: | |
| return letter_ord - 64 | |
| elif letter_ord >= 90 and letter_ord <= 122: | |
| return letter_ord - 96 | |
| return 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment