Created
June 2, 2017 07:32
-
-
Save bhaveshpraveen/941b434ea3ca3679aab0bd6530d300c6 to your computer and use it in GitHub Desktop.
filter for excluding special characters
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
def func(i): | |
return re.sub('[,./<>?;\':"\[\]{}|`~\-_=+)(*&^%$#@!]', '', i) | |
words_list = [ '"he$ll/o' , 'this:' , 'i7' ] | |
words_list = list(map(func, words_list)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment