擅长:python、mysql、java
<p>在进行拆分之前,请尝试从字符串中删除标点符号。在</p>
<pre><code>import string
s = "Some nice sentence. This has punctuation!"
out = s.translate(string.maketrans("",""), string.punctuation)
</code></pre>
<p>然后对<code>out</code>执行<code>split</code>。在</p>