3、统计列表英文字母的单词个数
d = ["a","uhhj","jlkjn",,"jlkjn"]
方法一:
data = list(set(d))dictcount = {}for i in data: dictcount[i]=d.count(i)
方法二:
dictcount = {}for i in d: if i not in dictcount.keys(): dictcount[i]=1 else: dictcount[i] +=1
print(dictcount)