擅长:python、mysql、java
<p>正是圆括号阻碍了迭代。如果可以删除它们:</p>
<pre><code>sent=['include', 'details', 'about', 'your performance','show', 'the', 'results,', 'which', 'you\'ve', 'got']
output = [w for w in sent if not w in stopwords]
</code></pre>
<p>如果没有,则可以执行以下操作:</p>
<pre><code>sent=[('include', 'details', 'about', 'your performance'),('show', 'the', 'results,', 'which', 'you\'ve', 'got')]
output = [i for s in [[w for w in l if w not in stopwords] for l in sent] for i in s]
</code></pre>