擅长:python、mysql、java
<p>以下是合理清洁输入的工作:</p>
<pre><code>>>> s = 'hello. these are sample sentences. there are three of them.'
>>> '. '.join(x.capitalize() for x in s.split('. '))
'Hello. These are sample sentences. There are three of them.'
</code></pre>
<p>如果句号周围有更多不同的空格,则可能需要使用更复杂的逻辑:</p>
^{pr2}$
<p>这将规范化空白,这可能是也可能不是您想要的。在</p>