Palindrome Python Using Hashing