def find_in_list (1st, v ):
“”” lst – a list
v – a value that may or may not be in the list “””
# Code
def find_in_list(lst, v):
for i in range(len(lst)):
if lst[i] == v:
return i
return -1 # if the value v is not found -1 is returned
l = [1, 2, 3, 4]
print(find_in_list(l, 3)) # 2
print(find_in_list(l, 5)) # -1