Created
December 12, 2013 00:35
-
-
Save mcescalante/7921270 to your computer and use it in GitHub Desktop.
Remove punctuation from python list
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
#Removes all of the punctuation in any item in a list. The characters to be removed are a string, "punctuation" from your list, "list" | |
list = [''.join(c for c in s if c not in punctuation) for s in list] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment