WLJS LogoWLJS Notebook

TakeDrop

TakeDrop[list, n] gives the pair {list1, list2}, where list1 contains the first n elements of list and list2 contains the rest.

  • TakeDrop[list, seq] gives the pair {Take[list, seq], Drop[list, seq]}.

Examples

TakeDrop[{a, b, c, d, e}, 2]
TakeDrop[Range[10], -3]

Please visit the official Wolfram Language Reference for more details.

On this page