05 2023 档案
摘要:## 如何为元祖中的每个元素命名,提升可读性 ![](https://img2023.cnblogs.com/blog/1304933/202305/1304933-20230509000229089-318279766.png) ## 方法1, index命名: ![](https://img20
阅读全文
摘要:![](https://img2023.cnblogs.com/blog/1304933/202305/1304933-20230509230501310-541330073.png) ![](https://img2023.cnblogs.com/blog/1304933/202305/1304933-20230509230527473-404255210.png) ![](https://im
阅读全文
摘要:## ![](https://img2023.cnblogs.com/blog/1304933/202305/1304933-20230509003224765-1453557723.png) ![](https://img2023.cnblogs.com/blog/1304933/202305/1304933-20230509003138690-2106351860.png) ![](https
阅读全文
摘要:dict.fromkeys(data,0) 默认字典,把data里面的值作为key,赋值给0 Counter对象的most_common(3)取出出现频率最高的3个 读取文件, 用re.split("\W+",txt)非字符进行分割,再用Counter进行处理
阅读全文
摘要:题目 经timeit测试 列表生成式比 filter(lambda x:x>=0,data) 快 python2 的dict的iteritems()方法, pyhton3可以看看有没有
阅读全文