如何在Python中创建列表视图tkinter可以处理文本文件中的数据? 我想打开可能包含联系人列表的文本文件。
例如:
iframe
然后在列表视图中布局这些数据。
任何人都可以提供帮助吗?
答案 0 :(得分:0)
你可以在python中创建列表,如下所示:
seq = L[name:number]
seq = L[::2] # get every other item, starting with the first
seq = L[::2] # get every other item, starting with the second
或者你可以直接提到下面提到:
name = L[::2] # get every other item, starting with the first
number = L[1::2] # get every other item, starting with the second
如果你想添加任何你可以添加的行。 我建议你选择第一种方法