micropython-lib/itertools/test_itertools.py

6 wiersze
177 B
Python

import itertools
print(list(itertools.islice(list(range(10)), 4)))
print(list(itertools.islice(list(range(10)), 2, 6)))
print(list(itertools.islice(list(range(10)), 2, 6, 2)))