WLJS LogoWLJS Notebook

Drop

Drop[list, n] gives list with its first n elements dropped.

Drop[list, -n] gives list with its last n elements dropped.

Drop[list, {m, n}] gives list with elements m through n dropped.

Examples

Drop the first 2 elements:

Drop[{a, b, c, d, e}, 2]
(* {c, d, e} *)

Drop the last element:

Drop[{a, b, c, d, e}, -1]
(* {a, b, c, d} *)

Please visit the official Wolfram Language Reference for more details.

On this page