Leetcode Check Palindrome In Python