
collections
screaming
这个作者很懒,什么都没留下…
展开
-
Queue.Queue vs collections.deque
Queue.Queue vs. collections.dequeup vote78down votefavorite22I need a queue which multiple threads can put stuff into, and multiple threads may read from.Py转载 2016-05-10 23:11:50 · 1022 阅读 · 0 评论 -
deque
class collections.deque([iterable[, maxlen]])Returns a new deque object initialized left-to-right (using append()) with data from iterable. If iterable is not specified, the new deque is empty.D转载 2016-05-11 15:37:12 · 418 阅读 · 0 评论 -
Counter统计每个字符出现的次数
在python的API中,提到了Counter,它具有统计的功能下面是我做的demo:1.统计自定义字符串中每个字符出现的次数2.读取一个文件,把文件中的内容转化为字符串,统计该字符串中每个字符串出现的次数运行效果:测试的文件:==================================代码部分:=======转载 2016-06-19 20:02:16 · 5353 阅读 · 2 评论