3 lines for python code


  • 0
    L

    too good to be true but it got accepted.
    """
    class Solution(object):
    def isPalindrome(self, x):
    """
    :type x: int
    :rtype: bool
    """
    X=str(x)
    reverse=X[::-1]
    return X==reverse
    """


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.