def palindrome(s):
s = "".join([character for character in s.lower() if character.isalnum()])
return s == s[::-1]
Palindrome
Function to check whether a string is a palindrome or not.
0 Comments
Add Comment
Log in to add a comment
def palindrome(s):
s = "".join([character for character in s.lower() if character.isalnum()])
return s == s[::-1]
Palindrome
Function to check whether a string is a palindrome or not.
Log in to add a comment