Palindrome Number

Given an integer x, return true if x is a palindrome, and false otherwise. A palindrome is a number that reads the same backward as forward.

Constraints

  • -2^31 <= x < 2^31 - 1
Saving… · 2 lines
class Solution:
def is_palindrome(self, x: int) -> bool:
Console

Click Run to execute sample tests.