ListTools
LengthSplit
split a list into an expression sequence of sublists of a given length
Calling Sequence
Parameters
Description
Examples
LengthSplit( L, n )
LengthSplit( L, n, pad = expr )
L
-
list
n
posint; the length of the sublists
expr
(optional) anything; an expression to use for padding the last list to length n
The LengthSplit command splits a list L into a sequence of sublists, each with n elements. If n does not divide evenly into , then the final sublist will have elements, unless the option is given, in which case the value of expr will be used to fill out the final sublist to length . If divides evenly into , then the pad option has no effect.
See Also
ListTools[Split]
StringTools[LengthSplit]
type[list]
Download Help Document