立即学习:https://edu.csdn.net/course/play/26755/340132?utm_source=blogtoedu
from itertools import islice
gen = iter(range(10))
print(gen)
print(type(gen))
for i in islice(gen, 2, 6):
print(i)
立即学习:https://edu.csdn.net/course/play/26755/340132?utm_source=blogtoedu
from itertools import islice
gen = iter(range(10))
print(gen)
print(type(gen))
for i in islice(gen, 2, 6):
print(i)