Two ways:
1) Write a separate method that takes an integer parameter and checks for palindrome integers by converting it to a string, and passing the string to your existing method. Quick and dirty, inefficient as heck, but hey! It works.
2) Write a separate method that takes an integer parameter, and does the same as your existing method, but extracting each digit using the
BitwiseOperators - Python Wiki[
^] - AND and SHIFT should do it.