Skip to content

Commit

Permalink
Merge pull request #95 from jxie0755/patch-4
Browse files Browse the repository at this point in the history
Update palindrome-number.py
  • Loading branch information
kamyu104 authored Jan 24, 2018
2 parents 4a946a8 + 71afc19 commit 2ceeb57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Python/palindrome-number.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ def isPalindrome(self, x):
while copy:
reverse *= 10
reverse += copy % 10
copy /= 10
copy //= 10

return x == reverse

if __name__ == "__main__":
print Solution().isPalindrome(12321)
print Solution().isPalindrome(12320)
print Solution().isPalindrome(-12321)
print Solution().isPalindrome(-12321)

0 comments on commit 2ceeb57

Please sign in to comment.