学习笔记(21):Python 面试100讲(基于Python3.x)-对产生器类型的对象使用切片

立即学习:https://edu.csdn.net/course/play/26755/340132?utm_source=blogtoedu

itertool中的API

产生器类型的对象:gen = iter(range(10))

from itertools import islice

for i in islice(gen,2,6):

     print i

发布了26 篇原创文章 · 获赞 0 · 访问量 111

猜你喜欢

转载自blog.csdn.net/wuchuang19/article/details/104232710