Answer to Question #286944 in Python for jac

Question #286944

palindrome


1
Expert's answer
2022-01-12T12:38:19-0500
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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS