Free Python Code for List Buttons!

This is free Python 3x code that shows how to create a button that displays a list when you press it. Just copy and paste the code into Python and run it:

from tkinter import * #This interface allow us to draw windows

def DrawList():
     plist = ['Egor','Fritz','Ooga']

     for item in plist:
          listbox.insert(END,item);

root = Tk() #This creates a window, but it won't show up

listbox = Listbox(root)
button = Button(root,text = "press me",command = DrawList)

button.pack()
listbox.pack() #this tells the listbox to come out
root.mainloop() #This command will tell the window come out