Creative Synergies Group uses short asset labels in review workflows. Implement a function that determines whether a label is a palindrome.
A palindrome reads the same from left to right and right to left. Compare characters exactly as provided: comparisons are case-sensitive, and spaces or punctuation are treated as ordinary characters.
Implement is_palindrome(text).
text, a string.true if text is a palindrome, otherwise return false.Use a two-pointer approach that compares the first and last remaining characters, then moves inward. Return as soon as a mismatch is found.
def is_palindrome(text):