Discuss / Python / 用字符串比较最方便

用字符串比较最方便

Topic source

遥望君山

#1 Created at ... [Delete] [Delete and Lock User]
def is_palindrome(n):
    return str(n) == str(n)[::-1]

  • 1

Reply