utensil package

Module contents

utensil.chunks(iterable, n)[source]

Yield successive n-sized chunks from lst.

>>> for chunk in chunks([1, 2, 3, 4, 5], 2):
...     print(chunk)
[1, 2]
[3, 4]
[5]
>>> for chunk in chunks(range(5), 2):
...     print(chunk)
[0, 1]
[2, 3]
[4]
>>> for chunk in chunks(range(5), 0):
...     print(chunk)
utensil.get_logger(name, logger_config=None)[source]