Discuss / Python / 作业

作业

Topic source
def is_palindrome(n):
    s = str(n)
    i = 0
    while i < len(s)/2:     
        if s[i] == s[-i - 1]:
            i = i + 1
            return True 
        return False

  • 1

Reply