def linear_Search(list, target):
    """
    Return the index position of if the target is found, else returns None
    """
    
    for i in range(0, len(list)):
        if(list[i] == target):
            return i
    return None


def verify(index):
    if(index != None):
        print("Target found at index: ", index)
    else:
        print("Target not found in list")


numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

result = linear_Search(numbers, 12)
verify(result)

result = linear_Search(numbers, 6)
verify(result)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: