Extract individual elements or groups of elements from a list.

Create a list

Use Range to set up a list of the first 10 squares:

Extract a single part

Use Part to pick the third element of the list:

  • Part has the short form notation [[... ]].

Extract a range

Use Span to pick out the elements from indices 1 to 5:

Use Take to pick out the elements from indices 5 to 8:

Pick out the last seven elements of the list using negative indices:

  • Negative indices count from the end of a list.