擅长:python、mysql、java
<p>您可以使用<code>Counter</code>来实现这一点,它将创建一个字典,其中每个唯一的单词作为键,相应的出现计数作为对应的值。然后遍历字典以找到值为<code>1</code>的键。示例代码如下:</p>
<pre><code>from collections import Counter
my_list = ["door", "table", "door", "chair", "couch", "door", "table", "closet"]
count_all = Counter(my_list)
for key, value in count_all.items():
if 1 == value:
print key
</code></pre>