I'm trying to make a program that checks if user's input word is a palindrome and asks words until the input is a palindrome. My problem is that I can't get my program to print anything and could use some tips to fixing it. This is what I have so far:
def palindrome(word):
while True:
word=input("Enter a word: ")
for i in range(len(word)):
if word[i]==word[(i+1)*-1]:
print(f"{word} was a palindrome!")
return True
else:
print("not a palindrome")
return False