Discuss / Python / 笨方法

笨方法

Topic source

rainux

#1 Created at ... [Delete] [Delete and Lock User]
def is_palindrome(n):
    a = str(n)
    b = ''    
    for x in reversed(a):
        b += x
    b = int(b)
    return b == n

  • 1

Reply