Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python palindrome

def isPalindrome(s):
    return s == s[::-1]
 
 
# Driver code
s = "malayalam"
ans = isPalindrome(s)
 
if ans:
    print("Yes")
else:
    print("No")
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #python #palindrome
ADD COMMENT
Topic
Name
4+2 =