Discuss / Python / 学习

学习

Topic source

陈蔺川

#1 Created at ... [Delete] [Delete and Lock User]

def is_palindrome(n):

    c=0

    for i in range(len(str(n))):

        if str(n)[i]!=str(n)[-i-1]:

            c=c+1

    return c==0


  • 1

Reply