class Solution(object):
def isPalindrome(self, x):
"""
:type x: int
:rtype: bool
"""
return str(x) == str(x)[::-1]
力扣回文数
原创
©著作权归作者所有:来自51CTO博客作者松月dd的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
2力扣-回文数(python3)
力扣简单题的第9题,两种简单直观的解题方法和暴力解题
倒序 回文数 字符串