Discuss / Python / 作业

作业

Topic source
def is_palindrome(n):
    L=str(n)
    x=0
    y=len(L)-1
    while x<y:
        if L[x]!=L[y]:
            return False
        x=x+1
        y=y-1
    return True

  • 1

Reply