lychrel.py

Created by schraf

Created on October 17, 2021

244 Bytes


while True:
  s=input("n = ")
  while True:
   input()
   a = int(s)
   v = list(s)
   v.reverse()
   l = "".join(v)
   if s == l: break
   b = int(l)
   s = str(a+b)
   print("{}+{}\n={}".format(a,b,s))
  print("Palindrome\n")