摘要: 1.用内置的count()方法,该方法返回子字符串在字符串中出现的次数(同样适用于列表)2.用collections模块的Counter类示例: 1 from collections import Counter 2 3 # =================================================================================... 阅读全文
posted @ 2018-12-21 10:43 KS毛毛虫 阅读(2026) 评论(0) 推荐(0) 编辑