<prompt> Kujenga kazi ambayo inachunguza kama kamba iliyotolewa ni palindrome au la.  <response>: Here is a function in Python that you can use to check whether a given string is a palindrome or not:pythondef is_palindromes: Convert the string to all lowercase letters s s.lower Remove all special characters and spaces s .joinc for c in s if c.isalnum Check whether the string is equal to its reversed version return s s::-1This function works by first converting the input string s to all lowercase letters and then removing all special characters and spaces from it, using a list comprehension. Finally, it checks whether the resulting cleaned up string is equal to its reversed version.Here are some examples of using this function:pythonprintis_palindromeracecar Trueprintis_palindromeA man, a plan, a canal: Panama Trueprintis_palindromeWas it a car or a cat I saw Trueprintis_palindromeNo lemon, no melon Trueprintis_palindromehello world FalseAs shown in these examples, this function can correctly determine whether a given string is a palindrome or not, even when the string contains spaces, special characters, and uppercase letters. 