Write a function in a specific language (e.g., "Write a Python function to check if a string is a palindrome").