title: tkinter: how to use after method
body: <p>Hey I am new to python and am using tkinter for my gui. I am having trouble using the "after" method.
  The goal is to make a random letter appear every 5 seconds.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>import random
  import time
  from tkinter import *
  
  
  root = Tk()
  
  w = Label(root, text="GAME")
  w.pack()
  
  frame = Frame(root, width=300, height=300)
  frame.pack()
  
  L1 = Label(root, text="User Name")
  L1.pack(side=LEFT)
  E1 = Entry(root, bd =5)
  E1.pack(side=LEFT)
  
  
  tiles_letter = ['a', 'b', 'c', 'd', 'e']
  
  
  while len(tiles_letter) &gt; 0:
      rand = random.choice(tiles_letter)
      tile_frame = Label(frame, text=rand)
      tile_frame.pack()
      frame.after(500)
      tiles_letter.remove(rand)  # remove that tile from list of tiles
  
  root.mainloop()
  </code></pre>
  
  <p>can someone please help me --- the problem is definitely frame.after(500):
  i'm not sure if it is correct to use "frame" and I don't know what which argument follows the 500.</p>
  
  <p>Thanks</p>