Python By Code
Wednesday, July 8, 2015
Python program to check if the String is Palindrome
s = 'abc'
revs = s[::-1]
print s
if cmp(s,revs):
print "Palindrome"
else:
print "Not a Plaindrome"
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment