Hi, please help to hence me how to break a pargraph to print line by line if it ends with coma, it is a phras, if it ends with period , it is a sentence. Thank you soo much in advance.
Andrea
For example:
text = "It's probably a great morning for a doughnut run in New York City, since you won't have to fight off the NYPD. Officers are already positioned at 21 different retailers to keep their eyes on the new iPhone 5. As part of "Operation ID," the cops are encouraging customers to engrave their new iAppendage with a unique NYC-prefaced serial number (at no cost), which will help identify the phone if it's lost or swiped."
I want to print :
Sentence 1:
phrase 1 = "It's probably a great morning for a doughnut run in New York City.
phrase 2 = since you won't have to fight off the NYPD
Sentence 2:
phrase 1 = Officers are already positioned at 21 different retailers to keep their eyes on the new iPhone 5...
Andrea
For example:
text = "It's probably a great morning for a doughnut run in New York City, since you won't have to fight off the NYPD. Officers are already positioned at 21 different retailers to keep their eyes on the new iPhone 5. As part of "Operation ID," the cops are encouraging customers to engrave their new iAppendage with a unique NYC-prefaced serial number (at no cost), which will help identify the phone if it's lost or swiped."
I want to print :
Sentence 1:
phrase 1 = "It's probably a great morning for a doughnut run in New York City.
phrase 2 = since you won't have to fight off the NYPD
Sentence 2:
phrase 1 = Officers are already positioned at 21 different retailers to keep their eyes on the new iPhone 5...
Comment