python collections模块
2016-07-26 13:14
417 查看
collections
from collections import Counter Counter([1,2,2,2,2,3,3,3,4,4,4,4])
输出字典
Counter({1: 5, 2: 3, 3: 2})
相关文章推荐
- python中烦人的锟斤拷(\xef\xbf\xbd)
- python中烦人的锟斤拷(\xef\xbf\xbd)
- python 3 安装 scrapy 并运行成功
- python学习——编写ORM
- 371. Sum of Two Integers [easy] (Python)
- Python爬虫学习心得
- python中continue和break的使用示例
- Python升级、iPython安装和python自动补全
- python 调用zabbix api接口实现主机的增删改查
- PyCharm2016.3专业版注册码
- ubuntu下怎么解决python "Non-ASCII character"错误
- Python学习笔记——文件写入和读取
- ipython notebook设置工作路径和自动保存.py文件 ipython_notebook_config.py
- Python(1):入门
- 【Python学习】python+Eclipse+pydev环境搭建
- Python 练习册,每天一个小程序(1)
- python学习第十天 -- 函数
- 列表、元组以及字符串
- python脚本编程:批量复制或删除文件
- python 元组列表字典的区别