split a list into an expression sequence of sublists of a given length
LengthSplit( L, n )
LengthSplit( L, n, pad = expr )
posint; the length of the sublists
(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 nops⁡L, then the final sublist will have irem⁡nops⁡L,n elements, unless the pad=expr option is given, in which case the value of expr will be used to fill out the final sublist to length n. If n divides evenly into nops⁡L, then the pad option has no effect.
L ≔ seq⁡i,i=1..12
L ≔ 1,2,3,4,5,6,7,8,9,10,11,12
Download Help Document
What kind of issue would you like to report? (Optional)
Thank you for submitting feedback on this help document. Your feedback will be used
to improve Maple's help in the future.