remove punctuations from a sentence and split the sentence into a list
def remove_punctuation(sentence): string = sentence.translate(None, string.punctuation) return string.split() remove_punctuation('This is a sentence. I want to split it into a list')