def AlgorithmBoyerMoore(text, key):
    i = len(key) - 1
    while i < len(text):
        j = 0
        while j < len(key) and text[i - j] == key[len(key) - 1 - j]:
            j += 1
        if j == len(key):
            return True, i - j + 1
        i += 1
    else:
        return False, 0


print(AlgorithmBoyerMoore("Wyszukiwanie", "nie"))

5c36424b58f0cddb9552f5ea27834a395111ccde
<mask token>

def AlgorithmBoyerMoore(text, key):
    i = len(key) - 1
    while i < len(text):
        j = 0
        while j < len(key) and text[i - j] == key[len(key) - 1 - j]:
            j += 1
        if j == len(key):
            return True, i - j + 1
        i += 1
    else:
        return False, 0


<mask token>

def AlgorithmBoyerMoore(text, key):
    i = len(key) - 1
    while i < len(text):
        j = 0
        while j < len(key) and text[i - j] == key[len(key) - 1 - j]:
            j += 1
        if j == len(key):
            return True, i - j + 1
        i += 1
    else:
        return False, 0


print(AlgorithmBoyerMoore('Wyszukiwanie', 'nie'))

def AlgorithmBoyerMoore(text, key):
    i = len(key) - 1
    while i < len(text):
        j = 0
        while j < len(key) and text[i - j] == key[len(key) - 1 - j]:
            j += 1
        if j == len(key):
            return True, i - j + 1
        i += 1
    else:
        return False, 0


print(AlgorithmBoyerMoore("Wyszukiwanie", "nie"))
