How would I go about counting the words in a sentence? I\'m using Python.
For example, I might have the string:
string = \"I am having a very
s = "I am having a very nice 23!@$ day. " sum([i.strip(string.punctuation).isalpha() for i in s.split()])
The statement above will go through each chunk of text and remove punctuations before verifying if the chunk is really string of alphabets.