摘要: collections模块中有一个叫做Counter的类,该类的作用就是计数器,Counter是对dict的加工,所有Counter继承了dict的方法 1、创建一个Counter,需要import collections库,通过collections库创建Counter,主要的功能就是统计每个元素 阅读全文
posted @ 2017-03-04 23:43 bainianminguo 阅读(243) 评论(0) 推荐(0) 编辑