# Getting Pieces of Lists

 First[list] the first element in list Last[list] the last element Part[list,n] or list[[n]] the n element Part[list,-n] or list[[-n]] the n element from the end Part[list,m;;n] elements m through n Part[list,{n1,n2,…}] or list[[{n1,n2,…}]] the list of elements at positions n1, n2, …

Picking out elements of lists.

We will use this list for the examples:
 In:= Out= Here is the last element of t:
 In:= Out= This gives the third element:
 In:= Out= This gives the list of elements 3 through 6:
 In:= Out= This gives a list of the first and fourth elements:
 In:= Out= Take[list,n] the first n elements in list Take[list,-n] the last n elements Take[list,{m,n}] elements m through n (inclusive) Rest[list] list with its first element dropped Drop[list,n] list with its first n elements dropped Most[list] list with its last element dropped Drop[list,-n] list with its last n elements dropped Drop[list,{m,n}] list with elements m through n dropped

Picking out sequences in lists.

This gives the first three elements of the list t defined above:
 In:= Out= This gives the last three elements:
 In:= Out= This gives elements 2 through 5 inclusive:
 In:= Out= This gives elements 3 through 7 in steps of 2:
 In:= Out= This gives t with the first element dropped:
 In:= Out= This gives t with its first three elements dropped:
 In:= Out= This gives t with only its third element dropped:
 In:= Out= "Manipulating Expressions like Lists" shows how all the functions here can be generalized to work not only on lists, but on any Wolfram Language expressions.

The functions here allow you to pick out pieces that occur at particular positions in lists. "Finding Expressions That Match a Pattern" shows how you can use functions like Select and Cases to pick out elements of lists based not on their positions, but instead on their properties.