Discuss / Python / 练习

练习

Topic source

liadbiz

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

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


  • 1

Reply