Finding the position(index) in a list

grafik
we are creating a sequence with the indexes
then we loop over it and filter out where the condition is met