Description Usage Arguments Details Value Examples
Constructs an iterator that returns elements of an iterable object
in
fixed-length chunks. If the length of the iterator is not divisible by
chunk_size
, the remainder of the last block is filled with the value
specified in fill
.
1 |
object |
an iterable object |
chunk_size |
the number of elements returned per chunk |
fill |
the value with which to fill the last chunk if the length of the
iterator is not divisble by |
This function corresponds to Python's grouper
function. We chose the
name ichunk
because it more explicitly defines the function's purpose.
each call to nextElem
results in a list of length
chunk_size
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.