s=input("Enter any string")
rstr=''
print("original string is ",s)
for i in range(len(s)):
rstr=s[i]+rstr
print("Reverse string is ",rstr)
if(s==rstr):
print("String is palindrome")
else:
print("String is not palindrome")
s=input("Enter any string")
rstr=''
print("original string is ",s)
for i in range(len(s)):
rstr=s[i]+rstr
print("Reverse string is ",rstr)
if(s==rstr):
print("String is palindrome")
else:
print("String is not palindrome")
Leave a Reply