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


In [3]:
def returnindex(listofnumbers):
        number = input('Enter a number you want to search: ')
        index=0
        for x in listofnumbers:
            if number==x:
                print('The index of the number',x,'is',index)
            index=index+1

In [ ]:


In [ ]: