Question: Functions Exercise 3 in python Problem Write a function called search _ list that takes a list and a search term as parameters. If the

Functions Exercise 3 in python
Problem
Write a function called search_list that takes a list and a search term as parameters. If the search term is located in the list, return the index of the matching element. The function should work even if there is a difference in capitalization. If the search term is not in the list, return -1.
Expected Output
If the function call is search_list(["dog", "fish", "cat"], "Cat"), the the function would return 2
If the function call is search_list(["water", "Toy", "house"], "toy"), then the function would return 1
If the function call is search_list(["box", "car", "hat"], "mouse"), the the function would return -1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!