collections.Counter 计数器
import collectionswords = ["萌萌","萌萌","萌萌","萌萌","爱","赖赖"]print(type(collections.Counter(words)))先指定一个list,然后调用collections.Counter()函数,将list传入,就可以得到计数。运行结果如下:Counter({'萌萌': 4, '爱': 1, '赖赖...