This commit is contained in:
2026-01-28 15:56:45 +03:00
parent 8bdba1f2f2
commit 3907f75973
11 changed files with 89 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
class Solution:
def isPalindrome(self, x: int) -> bool:
return str(x) == str(x)[::-1]
def main() -> None:
test = [121, -121, 10] # True, False, False
s = Solution()
for t in test:
print(f"isPalindrome({t}) = {s.isPalindrome(t)}")
if __name__ == "__main__":
main()