Discuss / Python / 代码

代码

Topic source

张文范

#1 Created at ... [Delete] [Delete and Lock User]
def is_palindrome(n):
    b = True
    l = list(str(n))
    for i in range(0,len(l)-1):
        if l[i] != l[len(l)-1-i]:
            b = False
            break
    return b

  • 1

Reply