擅长:python、mysql、java
<p>您可以使用<a href="https://docs.python.org/3/library/functions.html#map" rel="nofollow noreferrer">map</a>和<a href="https://docs.python.org/3/library/operator.html#operator.methodcaller" rel="nofollow noreferrer">operator.methodcaller</a>而不需要re,即使它是一个很棒的库。你知道吗</p>
<pre><code>from operator import methodcaller
' '.join(map(methodcaller('replace', '.', ''), abbrevs))
#No US Mses BS BA DC BTech Pte Mr OEM IRS sq Reg S-K
</code></pre>