擅长:python、mysql、java
<p>您应该从一个空列表开始,并向其中添加以下项目:</p>
<pre><code>matching_words = []
for word in source_of_words:
matching_words.append(word)
print(matching_words)
</code></pre>
<p>另外,为了让您了解<code>remove</code>方法:</p>
<pre><code>print(matching_words)
matching_words.remove('bar')
print(matching_words)
</code></pre>
<p>样本输出:</p>
<pre><code>['foo', 'bar', 'baz']
['foo', 'baz']
</code></pre>