Leetcode Check Palindrome String In Python