3
Built a simple Python script to count words, but it gave me a number way too high.
I made a function using the .split() method on a string from a book I downloaded, 'Pride and Prejudice'. It said there were over 150,000 words, which seemed wrong. I learned it was counting punctuation attached to words as separate items. Anyone know a better way to clean the text before splitting?
3 comments
Log in to join the discussion
Log In3 Comments