Python programs coding series - plaindrome
Reversing a string and checking whether the string is palindrome or not
#Reversing a string and checking palindrome or not
import string
word = input(βEnter the string to be reversed:β) reversed_word=word[::-1] print(βThe reverse of β+str(word)+β is β+str(reversed_word))
if word == reversed_word: print(word+β is a palindrome!!!β) else: print(word + β is not a palindrome!!!β)
Output
Enter the string to be reversed:level The reverse of level is level level is a palindrome!!!
