Palindrome In Python For Integer Rules