Skip to content

Instantly share code, notes, and snippets.

from PIL import ImageTk, Image, ImageDraw
import PIL
from tkinter import *
width = 200
height = 200
center = height // 2
white = (255, 255, 255)
def is_palindrome(n):
return str(n) == str(n)[::-1]
def is_lychrel(n, iterations=200):
for _ in range(iterations):
n += int(str(n)[::-1])
if is_palindrome(n):
return False
return True