You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9 lines
265 B
Python

import sys
def Next_smallest_Palindrome(num):
numstr = str(num)
for i in range(num+1,sys.maxsize):
if str(i) == str(i)[::-1]:
return i
print(Next_smallest_Palindrome(99));
print(Next_smallest_Palindrome(1221));