how to get an index of a list in python with a number code example Example: python find index by value >>> ["foo", "bar", "baz"].index("bar") 1