我有一个脚本可以在 alist 中找到单词重复:
newm = [u'life', u'selection', u'squire', u'naturalist', u'patriarch', u'home', u'man', u'public', u'nbsp', u'born', u'naturalist', u'theory', u'selectionbecame', u'foundation', u'country', u'gentleman', u'suggesting', u'class', u'time', u'death', u'evolutionary', u'imagery', u'ofscience', u'literature']
print newm
#count for list
counts = defaultdict(int)
print "uyti"
for x in newm:
counts[x]+=1
print counts
该程序甚至不打印“uyti”。错误是什么?