leetcode

Leetcode submissions
git clone git://git.laack.co/leetcode.git
Log | Files | Refs | README

palindrome-number.py (207B)


      1 class Solution:
      2     def isPalindrome(self, x: int) -> bool:
      3 
      4         ls = list(str(x))
      5         ls_cp = ls.copy()
      6         ls_cp.reverse()
      7 
      8         if ls == ls_cp:
      9             return True
     10         return False