Article From:https://www.cnblogs.com/sea-stream/p/9689104.html
def sequential_search(lis, key):
    for i in range(len(lis)):
        if(lis[i] == key):
            return i
        else:
            return False
 
 
LIST = [1, 5, 8, 123, 22, 54, 7, 99, 300, 222]
result = sequential_search(LIST, 5)
print(result)

  

Link of this Article: Python unordered table lookup

Leave a Reply

Your email address will not be published. Required fields are marked *