title: I'm trying to stop an a list from looping since it is empty. All I keep getting is indexerror can't pop from an empty list
body: <p>I'm doing a school project and I'm making a game that gives the user a choice to choose from a multiple choice option. I want it to show up in a GUI, however the only I know how to get it to show up correctly is by using the .pop method, where it goes down vertically a-e in the GUI.</p>
  
  <p>This is where I get the error:</p>
  
  <pre><code>tile_frame = Label(frame, text=tiles_letter.pop())
  IndexError: pop from empty list
  </code></pre>
  
  <p><br/></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']
  tiles_letter.reverse()
  
  def add_letter():
      tile_frame = Label(frame, text=tiles_letter.pop())
      tile_frame.pack()
      root.after(500, add_letter)
  
  root.after(0, add_letter)  # add_letter will run as soon as the mainloop starts.
  root.mainloop()
  </code></pre>
  
  <p>I do not know how to stop it from popping out of an empty list. I tried using a for..in..loop but it didn't work. Some help is really appreciated. </p>