Skip to content

Write a Python program to check whether a string entered by the user is a Palindrome or Not a Palindrome.

ASSIGNMENT

Q.3

Q.3 Write a Python program to check whether a string entered by the user is a Palindrome or Not a Palindrome. 

string = input("Enter a string: ") string = string.lower() reverse = string[::-1] if string == reverse: print("Palindrome") else: print("Not a Palindrome")