Create a function to search a list of numbers for a given number and return the index of that number in the list


In [1]:
def find_index(x):
    for x,y in enumerate(list):
        if y == x:
            return x

In [2]:
list= ['mercy', 'simon','isaac', 'alys']

In [3]:
find_index('mercy')

In [ ]: