Untitled

mail@pastecode.io avatar
unknown
python
17 days ago
302 B
1
Indexable
Never
if __name__ == '__main__':
    word = input("Please enter a word: ")

    reverse_word = ''
    for i in range(len(word)):
        reverse_word += word[len(word) - 1 - i]

    if word == reverse_word:
        print("This is a Palindrome")
    else:
        print("This is not a Palindrome")
Leave a Comment