(PP)write a python program to check whether the string is palindrome or not.

def isPalindrome(string):

    if(string == string[::-1]):

        return "The string is a palindrome."

    else:

        return "The string is not a palindrome." 


#Enter input string 

string = input("Enter string: ") 

print(isPalindrome(string)) 






Comments

Popular posts from this blog

python(BI)

Prac_8(AMP)

LSA10