Programming Examples
Python program to check the given string is palindrome or not
WAP to check the given string is palindrome or not.
Solution
s=input("Enter a String : ")
mid=len(s)//2
rev=-1
for a in range(mid):
if s[a]==s[rev]:
rev-=1
else:
print(s," is not Palindrome String");
break;
else:
print(s," is Palindrome String ")
Output/ Explanation:
Enter a String : nitin
nitin is Palindrome StringÂ
========================Â
Enter a String : infomax
infomax is not Palindrome String