Leetcode Check Palindrome In Python Using For Loop