Python By Code
Showing posts with label
palindrome
.
Show all posts
Showing posts with label
palindrome
.
Show all posts
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"
Older Posts
Home
Subscribe to:
Posts (Atom)