Palindrome String Leetcode Problems Python