# Identify the location of the last entry with a particular value in a list

I have a long list (Table) consisting of "True"s and "False"s. I would like to identify the position in the list of the last entry that takes the value "False". Is there a way to do this?

• Last[Position[list,False,1]][[1]]? – Henrik Schumacher Jul 23 at 0:38
• Ironically, there is a command FirstPosition but no LastPosition. – Henrik Schumacher Jul 23 at 0:39
• I am sure i saw a question very similar to this but can't find it. – kglr Jul 23 at 0:49

You can use FirstPosition on Reversed input list:

Length[list] + 1 - FirstPosition[False] @ Reverse[list]


Alternatively, use PositionIndex:

Last @ PositionIndex[list][False]

Last @ Position[False][list]

SequenceCases[list, a:{___, False} :> Length[a]]