# 判断字符串是否为回文 def is_palindrome(text): # 转换为小写并去除空格 cleaned = text.lower().replace(" ", "") return cleaned == cleaned[::-1] def is_palindrome_two_pointers(text): text = text.lower().re
# 判断字符串是否为回文 def is_palindrome(text): # 转换为小写并去除空格 cleaned = text.lower().replace(" ", "") return cleaned == cleaned[::-1] def is_palindrome_two_pointers(text): text = text.lower().re