while True: chosen_word = input("Enter a word: ") reversed_word = chosen_word[::-1] print(chosen_word == reversed_word)