itertools—Functionscreatingiteratorsforefficientlooping 2.3版本的新功能。
future_builtins.filter(function,iterable) 像itertools.ifilter()。
与sorted(itertools.chain(*iterables))返回iterable类似,不会一次将数据拉入内存,并假定每个输入流已经排序(从最小到最大)。
使用接受钥匙功能的工具(如sorted(),min(),max(),heapq.nlargest(),heapq.nsmallest(),itertools.groupby())。
这些是使现场快速提取作为参数都非常有用map(),sorted(),itertools.groupby(),或期望的功能参数等功能。
imap(func,iterable[,chunksize]) 相当于itertools.imap()。 所述CHUNKSIZE参数是与由所使用的一个map()方法。

扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2026 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059
粤公网安备44030502008569号
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号
