摘要: from collections import dequedef search(lines, pattern, history=5): previous_lines = deque(maxlen=history) for line in lines: if pattern in line: yiel 阅读全文
posted @ 2016-05-02 23:31 电神 阅读(548) 评论(0) 推荐(0) 编辑