_bzium

Untitled

Mar 21st, 2024
836
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. word = input("Give me a word: ")
  2.  
  3. def palindrome_or_not(word):
  4.     reversed_word = word[::-1]
  5.     if word.strip() == reversed_word.strip():
  6.         print("Is's a palindrome")
  7.     else:
  8.         print("It is not a palindrome")
  9.  
  10. palindrome_or_not(word)
  11.  
Advertisement
Add Comment
Please, Sign In to add comment