Search element
Create a function that takes a vector of numbers and a target value as input and returns True if the target value is found in the vector, or False otherwise.
Here, a vector is a one-dimensional Python list of numbers. Match the target with ==. An empty list returns False; keep the input unchanged.
Complete the supplied function in Listing 1. Keep its signature and use the checks below it.
TipHint
len(values) returns the number of elements, so len([3, 7]) is 2 and len([]) is 0. List indexing starts at 0: [3, 7][0] is 3. An index must refer to an existing element.
assert condition stops the check with an AssertionError when the condition is false.