palindrome number in python using function