📌  相关文章
📜  在列表框中加载文本文件行 python tkinter site:stackoverflow.com - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:10.442000             🧑  作者: Mango

代码示例1
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()