We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1dc03bc commit d26f0b2Copy full SHA for d26f0b2
solution/009.Palindrome Number/Solution.py
@@ -0,0 +1,6 @@
1
+class Solution(object):
2
+ def isPalindrome(self, x):
3
+ a = cmp(x,0)
4
+ s = a*x
5
+ y = int(`s`[::-1])
6
+ return (x == y)
0 commit comments