title: Change picture after 3sec in Tkinter Canvas
body: <p>In a Tkinter canvas, I want to display pic1.gif and after 3 seconds change the picture to pic2.gif. When I run the program below, it shows pic2.gif straight away.</p>
  
  <pre><code>from tkinter import *
  from time import sleep
  
  
  canvas_width = 300
  canvas_height =300
  
  master = Tk()
  
  canvas = Canvas(master, 
             width=canvas_width, 
             height=canvas_height)
  canvas.pack()
  
  img = PhotoImage(file="pic1.gif")
  canvas.create_image(20,20, anchor=NW, image=img)
  sleep(3)
  canvas.delete("all")
  img = PhotoImage(file="pic2.gif")
  canvas.create_image(20,20, anchor=NW, image=img)
  mainloop()
  </code></pre>
  
  <p>Many thanks!</p>