list1 = []
for i in range(1,1001):
str1 = str(i)
for j in range(0,len(str1)):
if str1[j] == str1[-1-j]:
list1.append(i)
print(list1)
Like 12321
, we try to find the same number in the middle
Since it's salty like that, if the front and the back match, it's included in the list 1
How do I make them all match so they're added to the list?
For example, the 7
digit can be verified to be true: If you get one wrong, it's not the number of calls.
Therefore:
If you meet the requirements of , what you want will be realized. Try it!
© 2025 OneMinuteCode. All rights reserved.