remove punctuations from a sentence and split the sentence into a list
def remove_punctuations(s): s = s.replace(',', '') s = s.replace('.', '') ... remove_punctuations('The quick brown fox jumps over the lazy dog.') # ['The', 'quick', 'brown', 'fox', 'jumps', 'over', 'the', 'lazy', 'dog']