我只是想知道是否有办法让列表中的每个元素显示在单独的行上,或者在 TKinter 的文本框中在它们之间添加一行。我现在拥有的是从另一个文件中提取的简单代码,但我不确定如何去做。
我的代码是这样的:
gui = compare.GCCCOMPARE.compare(mygcccompare)
root = Tk()
text = Text(root)
text.insert(INSERT, gui)
text.pack()
root.mainloop()
清单在哪里gui
。
我在文本框中得到的是:
["Parameter Change between files 0 and 1 : {'LPSUM': [(233, 42), '(253, 196)']}", "Parameter Change between files 1 and 2 : {'LPSUM': [(253, 196), '(15, 194)']}", "Parameter Change between files 2 and 3 : {'LPSUM': [(15, 194), '(229, 92)'],}"]
但我想要的是:
["Parameter Change between files 0 and 1 : {'LPSUM': [(233, 42), '(253, 196)']}",
"Parameter Change between files 1 and 2 : {'LPSUM': [(253, 196), '(15, 194)']}",
"Parameter Change between files 2 and 3 : {'LPSUM': [(15, 194), '(229, 92)']}"]