Created
February 17, 2016 23:25
-
-
Save graham-thomson/5f0131c090e5bf5abb49 to your computer and use it in GitHub Desktop.
python lambda function to remove non-ascii characters from a string
This file contains 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
remove_non_ascii = lambda string: "".join(letter for letter in string if ord(letter) < 128) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment