Program to check if a string is a palindrome

# Palindrome Check
string = input("Enter a string: ")

if string == string[::-1]:
    print("The string is a palindrome.")
else:
    print("The string is not a palindrome.")
Output:
Enter a string: radar
The string is a palindrome.

Leave a Reply

Your email address will not be published. Required fields are marked *