How to realize palindromes in python
How to achieve palindromes in python, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.
Def sum (a): s=len (str (a)) if slots 5: sum= int (str (a) [0]) + int (str (a) [1]) + int (str (a) [2]) + int (str (a) [3]) + int (str (a) [4]) return sumif s==6:sum = int (str (a) [0]) + int (str (a) [1]) + int (str (a) [2]) + int (str (a) [3]) + int (str (a) [4]) + int (str (a) [5]) return sumdef sum_1 (a): s=len (str (a)) if slots 5: sum= a+a//10+a//100+a//1000+a//10000 return sumif s==6:sum = a+a//10+a//100+a//1000+a//10000+a//100000return sumdef sum_2 (a): sum=0for i in range (len (str (a)): sum+=int (str (a) [I]) return sumn=int (input ()) for i in range (10000) 1000000): if str (I) = = str (I) [::-1] and n = = sum_2 (I): print (I) is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.