class Solution:
    def isPalindrome(self, x: int) -> bool:
        if (x < 0) or (((x % 10) == 0) and (x != 0)):
            return False
        
        reverted = 0
        while x > reverted:
            reverted = reverted * 10 + x % 10
            x = x // 10
        return x == reverted or x == (reverted // 10)
        
70bdfb66dc3ac78b0c85e8148ecb41e8aae0b6d4
<mask token>

class Solution:
    <mask token>

class Solution:

    def isPalindrome(self, x: int) ->bool:
        if x < 0 or x % 10 == 0 and x != 0:
            return False
        reverted = 0
        while x > reverted:
            reverted = reverted * 10 + x % 10
            x = x // 10
        return x == reverted or x == reverted // 10

class Solution:
    def isPalindrome(self, x: int) -> bool:
        if (x < 0) or (((x % 10) == 0) and (x != 0)):
            return False
        
        reverted = 0
        while x > reverted:
            reverted = reverted * 10 + x % 10
            x = x // 10
        return x == reverted or x == (reverted // 10)
        