# polidrome


def polidrome(word):

    if not word:
        return False

    word = word.lower();
    word_inv = word[::-1]

    return word == word_inv

# ----

def polidromearray(word):

    if not word:
        return False

    wordaslist = list(word.lower())
    size = len(wordaslist)
    middle = int(size/2)

    ispol = True

    for x in range(0, middle):
        if wordaslist[x] != wordaslist[(size - x - 1)]:
            ispol = False
            break

    return ispol

# ----


print(polidrome("ada"))
print(polidrome("madam"))
print(polidrome(None))
print(polidrome("hargusbicha"))
print("")
print(polidromearray("ada"))
print(polidromearray("madam"))
print(polidromearray(None))
print(polidromearray("hargusbicha"))