If you are using Python 2, you can achieve the same functionality with this:
f = lambda my_list, value:filter(lambda x: my_list[x] == value, range(len(my_list)))
Where my_list
is the list you want to get the indexes of, and value
is the value searched. Usage:
f(some_list, some_element)