Question #286944

palindrome


Expert's answer

def isPalindrome(s):

    return s == s[::-1]

 

 

# Driver code

s = "malayalam"

ans = isPalindrome(s)

 

if ans:

    print("Yes")

else:

    print("No")

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS