Discuss / Python / 不转换成str的方法!转化str的过程就是求余的过程!

不转换成str的方法!转化str的过程就是求余的过程!

Topic source

come哦

#1 Created at ... [Delete] [Delete and Lock User]

def is_palindrome(n): m=0; l=n; while n: m=m*10+(n%10) n=int(n/10) if m==l: return False return True


  • 1

Reply