JPMorganChase interview question

write python function which checks if inserted string is a palindrome