vgrabovets
2/27/2017 - 8:37 AM

find_words_in_list

find_words_in_list

def find_words_in_lst(state_lst, text_lst):
    i = 0
    n = len(state_lst)
    found = 0
    while i <= len(text_lst) - n and found == 0:
        if text_lst[i:(i+n)] == state_lst:
            found = 1
        i += 1
    return found