擅长:python、mysql、java
<p>具有检查<code>stopwords</code>中成员资格条件的列表理解。你知道吗</p>
<pre><code>print [item for item in List if item not in stopwords]
</code></pre>
<p>或<code>filter</code></p>
<pre><code>print filter(lambda item: item not in stopwords, List)
</code></pre>
<p>或者<code>set</code>操作,你可以参考我关于速度差异的答案<a href="https://stackoverflow.com/a/38977964/6320655">here</a>。你知道吗</p>
<pre><code>print list(set(List) - set(stopwords))
</code></pre>
<p><strong>输出->;</strong><code>['Noyouarenot']</code></p>