def is_palindrome(n): s=str(n) if s==s[::-1]: return True else: return False
s=s[::-1]这个是表示什么意思? 每-1取一个值?求解释
就是将原值和倒叙输出的值进行对比
Sign in to make a reply
taogebuaa