lundi 13 novembre 2017

What's the main purpose of update()? Why can't my code work without update()?

I've had a look around but couldn't really understand. You could say I'm stupid.

The code slowly generates columns of randomly selected numbers 1 and 0 on a 1920x1080 canvas

def matrix(): c.configure(bg="black") numbers=[0,1] for i in range(100): for j in range(50): c.create_text(i*20,j*20,text=random.choice(numbers),fill="green") c.after(50) c.update() # <------ matrix()




Aucun commentaire:

Enregistrer un commentaire