Linear search
The simplest way to find something in a list is to look at each item in turn, from the first to the last, and stop as soon as you see what you are looking for. If you reach the end without seeing it, it is not there.
Write linear_search(items, target) that returns the position of the first
item equal to target, or -1 if there is none. The point is to write the
loop yourself rather than call the index method or test target in items.
linear_search(["milk", "bread", "eggs"], "bread") -> 1
linear_search(["milk"], "eggs") -> -1
def linear_search(items, target):
...