load text file line in listbox python tkinter site:stackoverflow.com code example
Example: load text file line in listbox python tkinter site:stackoverflow.com
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()