Discuss / Python / 切片反转

切片反转

Topic source

#判断回文,1.整数转字符串2.字符串反转3.比较 def is_palindrome(n): s1 = str(n) s2 = s1[::-1] return s1 == s2


  • 1

Reply