Toast Inc Interview Question

Early stage tech task was to code a function checking if a string is a palindrome, with a minor complication.