how to get an index if a value maeches certain value in python code example Example: python find index by value >>> ["foo", "bar", "baz"].index("bar") 1