> For the complete documentation index, see [llms.txt](https://r24zeng.gitbook.io/leetcode-notebook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://r24zeng.gitbook.io/leetcode-notebook/zhong-yu-shua-dao-100-dao-le-wo-shi-fen-shui-ling/bu-chong-120-dao/9.-palindrome-number.md).

# 9. Palindrome Number

\# Easy

{% hint style="info" %}
Too easy.
{% endhint %}

{% tabs %}
{% tab title="Python" %}

```python
class Solution(object):
    def isPalindrome(self, x):
        """
        :type x: int
        :rtype: bool
        """
        if x < 0:
            return False
        
        x2 = 0
        temp = x
        while temp != 0:
            x2 = x2*10 + temp%10
            temp = temp//10
        if x2 == x:
            return True
        else:
            return False
```

{% endtab %}
{% endtabs %}
