Discuss / Python / 交作业

交作业

Topic source

執謎卜誤

#1 Created at ... [Delete] [Delete and Lock User]
    l = list(str(n))
    num = len(l)
    for i in range(int(int(num) / 2 + 1)):
        if l[i] != l[ - (i + 1)]:
            return False
    return True

  • 1

Reply