Palindrome or not in Python

A Palindrome is a word or a phrase which reads the same in both directions. This code illustrates the Palindrome of a String

Source code :

string = "MADAM" #Change the String

if(string == string[::-1]):
    print("The given String is a Palindrome")
    print("The given String is not a Palindrome")

Output :

The given String is a Palindrome

Output :


Comments :