I'm having a bit of trouble trying to count the number of words per sentence. For my case, I'm assuming sentences only end with either "!"
, "?"
, or "."
I have a list that looks like this:
["Hey, "!", "How", "are", "you", "?", "I", "would", "like", "a", "sandwich", "."]
For the example above, the calculation would be 1 + 3 + 5 / 3
. I'm having a hard time achieving this, though! Any ideas?