Following is a program to check if the given String is Palindrome or not :
string = input("Enter the string ")length = len(string)i = 0if length%2 == 0:while i<=(length/2):if string[i]!=string[-(i+1)]:print(f"{string} is not a palindrome")breaki += 1else:print(f"{string} is a palindrome")else:
while i<=(length-1)/2:
if string[i] != string[-(i+1)]:
print(f"{string} is not a palindrome")
break
i += 1
else:
print(f"{string} is a palindrome")
