def sublistExists(list, sublist):
    for i in range(len(list) - len(sublist) + 1):
        if sublist == list[i:i + len(sublist)]:
            return True
return False
Check for presence of a sliced list in Python