Jul-20-2020, 02:50 PM
I sure can:
import random from tkinter import * import time # GUI root = Tk() root.geometry('900x900+250+100') root.title('Test') root.configure(background='grey') Kanvas = Canvas(root,width=900, height=900, bg='grey') Kanvas.pack() colors = ('white','yellow','green','red') def new_sit(): for row in range(60): for col in range(60): color= random.choice(colors) y = row * 15 x = col * 15 Kanvas.create_rectangle(x,y,x+15,y+15,fill=color) root.update() steps = 0 while True: steps += 1 Kanvas.delete('all') print(f'Step {steps}') new_sit() root.mainloop()
It is more important to do the right thing, than to do the thing right.(P.Drucker)
Better is the enemy of good. (Montesquieu) = French version for 'kiss'.
Better is the enemy of good. (Montesquieu) = French version for 'kiss'.