count.extend(collections.Counter(list1).most_common(2))表示:使用collections.Counter统计list1列表重单词的频数,然后使用most_common方法取top2频数的单词.然后加入到count中.# -*- coding:utf-8 -*-import collections words = ['physics','physics', 'chemistry', 'the','the','the','the','a','b'…