Palindrome


SUBMITTED BY: Guest

DATE: Sept. 13, 2014, 3:55 a.m.

FORMAT: Python

SIZE: 322 Bytes

HITS: 900

  1. print "Check if a word is Palindrome"
  2. print "============================="
  3. word = raw_input("Enter Word : ")
  4. new = ''.join(word[-i] for i in range(1,len(word)+1))
  5. if new == word:
  6. print"The Word %s is Palindrome" % word
  7. else:
  8. print"The Word %s is not Palindrome" % word

comments powered by Disqus