search list for value python code example Example: python search list by value [1,2,3].index(2) # => 1 [1,2,3].index(4) # => ValueError