Check Tamil word or sentence is palindrome

How to check given text is palindrome or not def sanitize(text): for char in [" ", ".", ",", ";", "\n"]: text = text.replace(char, "") return text def palindrome(word): # This approach is o(n), problem can be solved with o(n/2) # I am using this approach for brevity return word == word[::-1] palindrome(sanitize("madam")) # True palindrome(sanitize(u"விகடகவி")) # False Here is the hand made version for Tamil # Assign the variable meal the value 44. [Read More]