```
class Solution(object):
def isPalindrome(self, x):
"""
:type x: int
:rtype: bool
"""
if x < 0:
return False
elif x < 10:
return True
mylist = []
while x != 0:
mylist.append(x % 10) # add the remainder to the list
x = x // 10 # reduce the digits of the given number by integer division
if mylist == mylist[::-1]:
return True
else:
return False
```

beats 66.70% of submissions