Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("A palindrome is a word that reads the same forwards and backwards.")
- word = input("Give me a word. I'll tell you if it's a palindrome or not.")
- def palindrome(word):
- if word == word[::-1]:
- print("It's a palindrome!")
- if word != word[::-1]:
- print("It's not a palindrome!")
- palindrome(word)
Add Comment
Please, Sign In to add comment