TakeList
Examples
open allclose allBasic Examples (5)Summary of the most common use cases
Take sublists of different lengths from a list of symbols:

https://wolfram.com/xid/0j41uwt2-ot1258


https://wolfram.com/xid/0j41uwt2-mhfgz4

Take two elements, then three elements, and then all the rest:

https://wolfram.com/xid/0j41uwt2-vxvez5

Take two elements, then three elements, and then up to 10 and five if present:

https://wolfram.com/xid/0j41uwt2-q72fcq

Take a list of subexpressions from an expression with any head:

https://wolfram.com/xid/0j41uwt2-ojnd77

Scope (2)Survey of the scope of standard use cases
Take sublists using different sequence specifications:

https://wolfram.com/xid/0j41uwt2-v4q38d

Take subblocks of different sizes from a matrix:

https://wolfram.com/xid/0j41uwt2-brmaqp


https://wolfram.com/xid/0j41uwt2-hqeerr


https://wolfram.com/xid/0j41uwt2-pjq85b

Properties & Relations (5)Properties of the function, and connections to other functions
TakeList[list,seqs] is equivalent to FoldPairList[TakeDrop,list,seqs]:

https://wolfram.com/xid/0j41uwt2-oue6uh


https://wolfram.com/xid/0j41uwt2-0rest5


https://wolfram.com/xid/0j41uwt2-7a17fx

TakeList[list,{n,…,n}] is equivalent to Partition[list,n] for an appropriate number of take specifications:

https://wolfram.com/xid/0j41uwt2-0q0672


https://wolfram.com/xid/0j41uwt2-pn8oo1


https://wolfram.com/xid/0j41uwt2-vc0vwb

The equivalent of Partition[list,UpTo[n]] may require an additional take specification:

https://wolfram.com/xid/0j41uwt2-17z5ct


https://wolfram.com/xid/0j41uwt2-0rzt2d

Subdivide a list in sublists of different lengths using TakeList:

https://wolfram.com/xid/0j41uwt2-szf55i


https://wolfram.com/xid/0j41uwt2-lzfba8

The original list can be reconstructed using Flatten:

https://wolfram.com/xid/0j41uwt2-ysdbz4

Subdivide an array in blocks of different sizes using TakeList:

https://wolfram.com/xid/0j41uwt2-xe0a2w


https://wolfram.com/xid/0j41uwt2-3nz2tm

The original matrix can be reconstructed with ArrayFlatten:

https://wolfram.com/xid/0j41uwt2-bjdfpv

Take a list of expressions with the same head and any lengths:

https://wolfram.com/xid/0j41uwt2-nb9ydq

https://wolfram.com/xid/0j41uwt2-27x0kr

Join those expressions into a single expression with the common head:

https://wolfram.com/xid/0j41uwt2-5qqcp8

The original list can be reconstructed with TakeList by giving the lengths of the subexpressions:

https://wolfram.com/xid/0j41uwt2-jniedg

Wolfram Research (2017), TakeList, Wolfram Language function, https://reference.wolfram.com/language/ref/TakeList.html.
Text
Wolfram Research (2017), TakeList, Wolfram Language function, https://reference.wolfram.com/language/ref/TakeList.html.
Wolfram Research (2017), TakeList, Wolfram Language function, https://reference.wolfram.com/language/ref/TakeList.html.
CMS
Wolfram Language. 2017. "TakeList." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/TakeList.html.
Wolfram Language. 2017. "TakeList." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/TakeList.html.
APA
Wolfram Language. (2017). TakeList. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TakeList.html
Wolfram Language. (2017). TakeList. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TakeList.html
BibTeX
@misc{reference.wolfram_2025_takelist, author="Wolfram Research", title="{TakeList}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/TakeList.html}", note=[Accessed: 06-June-2025
]}
BibLaTeX
@online{reference.wolfram_2025_takelist, organization={Wolfram Research}, title={TakeList}, year={2017}, url={https://reference.wolfram.com/language/ref/TakeList.html}, note=[Accessed: 06-June-2025
]}