Longest Palindrome Problem In Leetcode Python