Question: return the indicis of a value from list

April 08 2014 casperyc 812
Maple 18

0

Hi, with a list

l:=[1,1,1,2,3,3,4];

What's the best way to get the index(s) for the values equal to '1'?

Say for x=1, we want

[1,2,3]

for x=2, we want

[4]

ect.

 

Please Wait...