# Find the indices of elements which are larger than 10 in a list [duplicate]

I have a list a, which consists of some positive real numbers. I want to find the indices of elements which are larger than 10 in list a, and put the indices into another list index. The following is my code:

a = {1, 3, 5, 7, 9, 11, 13, 15, 17, 19};
index = {};
For[i = 1, i <= Length[a], i++,
If[a[[i]] > 10, index = Append[index, i]]
]
index


The output is

{6, 7, 8, 9, 10}


which is correct. Is there a better way to find the list index? For example, do not use the For loop. Thank you very much in advance.

## marked as duplicate by Jason B., Michael E2, m_goldberg, ilian, Community♦Sep 1 '16 at 3:25

• Position[a, _?(# > 10 &)] . If you start at 1, if 0 just subtract 1 – ubpdqn Aug 31 '16 at 7:48
You could use Pick and UnitStep as follows:
index = Pick[Range[Length[a]], UnitStep[10 - a], 0]