We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4fc0e9 commit f8cf103Copy full SHA for f8cf103
python/easy/9. Palindrome Number.py
@@ -0,0 +1,5 @@
1
+class Solution:
2
+ def isPalindrome(self, x: int) -> bool:
3
+ str_forward = str(x)
4
+ str_backward = str_forward[::-1]
5
+ return str_forward == str_backward
0 commit comments