Pages

Thursday 10 March 2016

Pallindrome String

# WAP to check if a string is pallindrome or not
# Set Your Font as Courier New

z=raw_input("Enter a string: ")
z.lower()
for i in range(-len(z),0) :
x=x+z[i]
if x==z :
print "Given String is Pallindrome"
else :
print "Given String is not a Pallindrome"

Output 1
Enter a string: aIbohPhoBiA
Given String is Pallindrome

Output 2
Enter a string: palindrome
Given String is not a Pallindrome