摘要: 一、从队列两端高效插入、删除元素,及保留固定数量的数据条目: collections.deque([iterable[,maxlen=N]]) a = collections.deque([1, 2],maxlen=3) a.appendleft(3) [3, 1, 2] a.appendleft( 阅读全文
posted @ 2014-09-08 20:51 范辉 阅读(226) 评论(0) 推荐(0) 编辑