snakemake.common.group_into_chunks

snakemake.common.group_into_chunks(n, iterable)[source]

Group iterable into chunks of size at most n.

See https://stackoverflow.com/a/8998040.