Guest User

Untitled

a guest
Mar 22nd, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. def ex6():
  2.  
  3. word = input("Please enter a single word: ")
  4.  
  5. reverse_word = word[::-1]
  6.  
  7.  
  8. print(word, reverse_word)
  9.  
  10. if word == reverse_word:
  11. print("{0} is palindrome.".format(word))
  12. else:
  13. print("{0} is not palindrome.".format(word))
Add Comment
Please, Sign In to add comment