Source Code:
def pali(x):
y=len(x)
for i in range(len(x)//2):
y=y-1
if x[i]==x[y]:
continue
else:
print("It's not a palindrome")
break
else:
print("It's a palindrome")
x=input("Enter the string ")
pali(x)
Output:
Enter string:RACECAR
It’s is a Palindrome
Enter string:SCHOOL
It's not a palindrome