1#A palindrome is a word, number, phrase, or other sequence of characters which reads the same backward as forward.
2#Ex: madam or racecar.
3#CODE BY VENOM
4a=input("Enter you string:\n")
5w=str(a)
6if w==w[::-1]: # w[::-1] it will reverse the given string value.
7 print("Given String is palindrome")
8else:
9 print("Given String is not palindrome")
10#CODE BY VENOM
11#CODE BY VENOM
12
1#A palindrome is a word, number, phrase, or other sequence of characters which reads the same backward as forward.
2#Ex: madam or racecar.
3def is_palindrome(w):
4 if w==w[::-1]: # w[::-1] it will reverse the given string value.
5 print("Given String is palindrome")
6 else:
7 print("Given String is not palindrome")
8
9is_palindrome("racecar")