from tkinter import * root = Tk() Lb = Listbox(root) Lb.grid() f = open("test.txt","r") for x in f: Lb.insert(END,x) print(x) f.close() root.mainloop()