<prompt> Kujenga algorithm ambayo inaweza kuamua palindromes katika kamba fulani  <response>: A palindrome is a word, phrase, or sequence of characters that reads the same backward as forward. Here is an algorithm that can determine the palindromes in a given string:1. Start by defining a function is_palindrome that takes a string as an input and returns a boolean value. 2. Inside the is_palindrome function, convert the input string to lowercase and remove any non-alphabetic characters using a regular expression or a string method.3. Compare the modified string to its reversed version. If the two strings are equal, the function returns True, otherwise it returns False.4. Define another function find_palindromes that takes a string as an input and returns a list of all the palindromes in the given string.5. Inside the find_palindromes function, split the input string into a list of words, and initialize an empty list palindromes.6. Loop through the list of words, and for each word, call the is_palindrome function. If the function returns True, append the word to the palindromes list.7. Return the palindromes list.pythonimport redef is_palindromestr: str re.subrW, , str.lower return str str::-1def find_palindromesstr: words str.split palindromes for word in words: if is_palindromeword: palindromes.appendword return palindromesWith these functions, you can input any string into the find_palindromes function, and it will return a list of all the palindromes in the given string. 