def line_search(li,val): for ix,v in enumerate(li): if v == val: return ix return None li = [1,5,3,7] ix = line_search(li,3) print(ix)
2023-12-19 17:03:27
def line_search(li,val): for ix,v in enumerate(li): if v == val: return ix return None li = [1,5,3,7] ix = line_search(li,3) print(ix)