Testing and Searching List Elements
|Position[list,form]||the positions at which form occurs in list|
|Count[list,form]||the number of times form appears as an element of list|
|MemberQ[list,form]||test whether form is an element of list|
|FreeQ[list,form]||test whether form occurs nowhere in list|
"Getting Pieces of Lists" discusses how to extract pieces of lists based on their positions or indices. The Wolfram System also has functions that search and test for elements of lists, based on the values of those elements.
As discussed in "Finding Expressions That Match a Pattern", the functions Count and Position, as well as MemberQ and FreeQ, can be used not only to search for particular list elements, but also to search for classes of elements which match specific "patterns".