Leetcode Check Palindrome In Python Without Functional Groups