You are viewing a single comment's thread. Return to all comments →
#import re #sentence = "^\".*\"$|.*!$|.*?$|[a-zA-Z0-9]+\." input_text = raw_input().strip().split() strp = 0 for i in range(len(input_text)): if '.' in input_text[i] or '?' in input_text[i] or '!' in input_text[i]: print(' '.join(input_text[strp:i+1])) strp = i+1 print(' '.join(input_text[strp:]))
Seems like cookies are disabled on this browser, please enable them to open this website
From Paragraphs to Sentences
You are viewing a single comment's thread. Return to all comments →