title: about Python canvas moving object
body: <p>I want to move a rectangle from left to right with a step of 50,but the canvas doesn't draw the rectangle until it arrive right side.</p>
  <pre><code>import tkinter as tk
  import time
  root=tk.Tk()
  c_width,c_height=500,250
  cv = tk.Canvas(root,bg = 'white',width=c_width,height=c_height)
  
  l_x=0
  l_y=0
  r_x=50
  r_y=50
  step=50
  r1=cv.create_rectangle(l_x,l_y,r_x,r_y,fill='red')
  
  while l_x&lt;c_width-50:
     
     cv.delete(r1)
     l_x=l_x+step
     r_x=r_x+step   
     r1=cv.create_rectangle(l_x,l_y,r_x,r_y,fill='red')
     print(c_width,l_x)
     time.sleep(1)
  
  cv.pack()
  root.mainloop()
  
  </code></pre>