擅长:python、mysql、java
<p>使用正则表达式。</p>
<pre><code>In [13]: import re
In [14]: par = "This is a paragraph? So it is! Ok, there are 3 sentences."
In [15]: re.split(r'[.!?]+', par)
Out[15]: ['This is a paragraph', ' So it is', ' Ok, there are 3 sentences', '']
</code></pre>