Consider downloading the Natural Language Toolkit ( NLTK ). Then you can create sentences that won't break for things like "USA" or can't split sentences ending in "?!".
>>> import nltk >>> paragraph = u"Hi, this is my first sentence. And this is my second. Yet this is my third." >>> sentences = nltk.sent_tokenize(paragraph) [u"Hi, this is my first sentence.", u"And this is my second.", u"Yet this is my third."]
Your code becomes much more readable. To access the second sentence, you use the notation you are used to.
>>> sentences[1] u"And this is my second."
source share