会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
HunterSniper
博客园
首页
新随笔
联系
管理
订阅
2021年2月20日
python collections
摘要: #collections 模块#Counter 计数器,生成一个类字典类型from collections import Counterstr="abcbcaccbbad"#统计数量dcamd=Counter(str)print(dcamd)''' 打印:Counter({'b': 4, 'c':
阅读全文
posted @ 2021-02-20 10:14 HunterSniper
阅读(91)
评论(0)
推荐(0)
2019年8月2日
Python set()
摘要: #################无序集合set_one=set(['a','b','c'])set_two=set(['b','c','d'])print (set_one)################# update 合并两个集合并去重,无返回值#t=set_one.update(set_t
阅读全文
posted @ 2019-08-02 08:09 HunterSniper
阅读(223)
评论(0)
推荐(0)
2019年7月30日
Python字典
摘要: dict_one = {'a':'aa','b':'bb'}print(dict_one)################# clear 清空字典#dict_one.clear()#print(dict_one)################# copy 复制字典#复制dict_one,并更改di
阅读全文
posted @ 2019-07-30 21:36 HunterSniper
阅读(151)
评论(0)
推荐(0)
公告