Skip to content

Commit

Permalink
Update palindrome-number.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jxie0755 authored Jan 24, 2018
1 parent 4a946a8 commit 71afc19
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 71afc19

Please sign in to comment.