Write code to check whether a string is a palindrome, then write test cases for your code and execute each of them.
Implement is_palindrome(text), which accepts a string and returns a boolean. Treat uppercase and lowercase characters as different, and treat spaces and punctuation as ordinary characters.
Examples: "level" returns true; "MathWorks" returns false; "" returns true.
Use a solution that runs in linear time. Provide test cases covering ordinary inputs, an empty string, a single character, and non-palindromic strings. The input length is at most 1,000 characters.
def is_palindrome(text):