For example I have a sentence
\"He is so .... cool!\"
Then I remove all the punctuation and make it in a list.
[\"He\", \"
You can filter out empty strings very easily using a list comprehension:
x = ["He", "is", "so", "", "cool"] x = [str for str in x if str] >>> ['He', 'is', 'so', 'cool']