Palindrome Number one line solution || Leetcode || Codecheff || hackerramk

 class Solution:

    def isPalindrome(self, x: int) -> bool:

        return x>=0 and str(x)[::-1]==str(x)




Comments

Popular posts from this blog

Digit frequency solution in c hackerrank solution

Guess a number game in python