Contact: aviboots(AT)netvision.net.il
41,636 questions
54,299 answers
573 users
def linearsearch(lst, ln, n): for i in range(0, ln): if (lst[i] == n): return i return -1 lst = [1, 2, 3, 4, 5, 8, 20, 30] if (linearsearch(lst, len(lst), 8) == -1): print("Element not found") else: print("Element found") ''' run: Element found '''