TikTok interview question

detect palindrome leetcode question in python