Discuss / Python / 比各位大佬的麻烦好多。。。

比各位大佬的麻烦好多。。。

Topic source

小羊飞的

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

def is_palindrome(n): i=0 li=[] while n > 0: li.append(n % 10) n//=10 i+=1 for x in range(0,len(li)//2+1): if(li[x]!=li[-1-x]): break if (x==len(li)//2): return True else: return False


  • 1

Reply