We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ed565d5 commit 6b167cbCopy full SHA for 6b167cb
LeetCode Python/Math/9. Palindrome Number.py
@@ -0,0 +1,8 @@
1
+class Solution:
2
+ def isPalindrome(self, x: int) -> bool:
3
+ if x < 0:
4
+ return False
5
+
6
+ temp = str(x)
7
8
+ return int(temp[::-1]) == x
0 commit comments