2017年9月7日
摘要: In [1]: import itertools In [2]: dir(itertools) Out[2]: ['__doc__', '__file__', '__name__', '__package__', 'chain', 'combinations', 'combinations_with_replacement', 'compress', 'count', 'c... 阅读全文
posted @ 2017-09-07 23:57 漫步的影子 阅读(169) 评论(0) 推荐(0) 编辑
摘要: itertools 阅读全文
posted @ 2017-09-07 23:42 漫步的影子 阅读(168) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/env python # coding: utf-8 import six from functools import partial from itertools import groupby def sort_items_by_key(items, key): result = {} for k, v in key.items(): ... 阅读全文
posted @ 2017-09-07 22:30 漫步的影子 阅读(1417) 评论(1) 推荐(0) 编辑