Created
January 31, 2014 04:43
-
-
Save rickcnagy/8726723 to your computer and use it in GitHub Desktop.
Filters a string for a certain subset of characters, such as only letters or alphanumeric characters.
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
| # from http://stackoverflow.com/a/12851835/1628796 | |
| # returns only the lowercase version of the letters - useful for comparing strings | |
| def alpha(string): | |
| return ''.join([i for i in string if i.isalpha()]).lower() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment