In[42]:=
Select[ { 3, 7, 9, 17, 127, 315}, PrimeQ]
Out[42]=
{3, 7, 17, 127}
Up to
Selecting Member of a List