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