摘要: collections是Python内建的一个集合模块,其中提供了许多有用的集合类: namedtuple:只有属性的简易类 deque:双向增删的List ChainMap:多个字典的链接 Counter:计数器 以及其他可以参考:10.8 模块:collections - ShineLe - 博 阅读全文
posted @ 2021-01-29 19:21 ShineLe 阅读(381) 评论(0) 推荐(0)
摘要: import xlwt import os def write_excel(words,filename): #写入Excel的函数,words是数据,filename是文件名 wb=xlwt.Workbook() sheet=wb.add_sheet('sheet1') attr=['词语','词 阅读全文
posted @ 2021-01-29 15:00 ShineLe 阅读(1037) 评论(0) 推荐(0)