Discuss / Python / 交作业

交作业

Topic source

作业题:

def is_palindrome2(n):
    newStr = ''
    for x in reversed(str(n)):
        newStr = newStr + x
    return newStr == str(n)

  • 1

Reply