#random lines, undraws old lines import random import time from Tkinter import * frmMain = Tk() myCanvas = Canvas(width=400, height=400, background="orange") oldx = 0 oldy = 0 while oldx <= 350: newx = random.randrange(1,401) newy = random.randrange(1,401) myCanvas.create_line(oldx,oldy,newx,newy,arrow="last") myCanvas.pack() myCanvas.update() time.sleep(1) myCanvas.create_line(oldx,oldy,newx,newy,fill="orange") oldx = newx oldy = newy myCanvas.pack() frmMain.mainloop()