擅长:python、mysql、java
<p>只需使用regex或(<code>|</code>)</p>
<pre><code>import re
l1 = ['John', 'London', '219980']
s1 = "This is John Clay. He is from London with 219980"
re.sub('|'.join(l1),'',s1)
</code></pre>
<p>如果l1包含<code>|</code>,可以先用<code>r'\|'</code>对其进行转义</p>