Solutions will be available when this assignment is resolved, or after a few failing attempts.

Search for string

Define a function search_for_string that receives a list and a search term.
Use a loop to go through the list and see if the string is there. If it is,
return 'string found!'. If not, return 'string not found'


>>> search_for_string(['santiago', 'santi', 'santa'], 'santa')
'string found!''
>>> search_for_string(['a', 'b', 'c'], 'd')
'string not found'
>>> search_for_string([], 'a')
'string not found'

Test Cases


def search_for_string(a_list, search_term): pass