Discuss / Python / 作业

作业

Topic source

def is_palindrome(n): L=[] while(n!=0): L.append(n%10) n=n//10 for i in range(len(L)): if L[i]!=L[-(i+1)]: return False return True


  • 1

Reply