Elements of Lists

The Wolfram Language provides a carefully chosen set of functions for accessing elements of lists using either indices or positions, or using patterns or criteria for their values.

(RefLink[list[[...]], paclet:ref/Part]) ((RefLink[Part, paclet:ref/Part])) — parts of lists, resettable with =

(RefLink[Span, paclet:ref/Span]) ((RefLink[;;, paclet:ref/Span])) — general specification for spans or blocks of elements

(RefLink[UpTo, paclet:ref/UpTo]) — a certain number of elements, or as many as are available

(RefLink[Position, paclet:ref/Position]) — find positions of elements matching a pattern

(RefLink[Select, paclet:ref/Select]), (RefLink[SelectFirst, paclet:ref/SelectFirst]) — select elements that satisfy a criterion

(RefLink[Cases, paclet:ref/Cases]), (RefLink[FirstCase, paclet:ref/FirstCase]) — give elements that match a pattern

(RefLink[Nothing, paclet:ref/Nothing]) — an element automatically removed from lists

(RefLink[MemberQ, paclet:ref/MemberQ]) — test whether an element is a member of a list

Finding Sublists