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 nice 23!@$ day. "
That would be 7 words. I'm having trouble with the random amount of spaces after/before each word as well as when numbers or symbols are involved.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…