from Tkinter import *
root = Tk()
mylistbox = Listbox(root)
mylistbox.pack()
mylistbox.delete(0, END)
mylistbox.insert(END, "This is the row number 1")
for number in range(2,41):
mylistbox.insert(END, "This is the row number " + str(number))
root.mainloop()