Closed tandav closed 2 years ago
# https://more-itertools.readthedocs.io/en/stable/api.html def take (n, iterable): return list(itertools.islice(iterable, n)) def chunked(iterable, n): return iter(functools.partial(take, n, iter(iterable)), [])