擅长:python、mysql、java
<p><code>strip()</code>只删除字符串开头和结尾的字符,而不是字符串中间的字符。如果要删除字符串中的任何位置,请使用<a href="https://docs.python.org/2/library/string.html#string.replace" rel="nofollow">replace</a>:</p>
<pre><code>'\sgoogle\s.com'.replace('\s', '');
</code></pre>