我对所有列值都获得ROOM NO。我想为每列显示不同的列值。我该怎么办,请帮忙。 这是我的代码
def view():
c.execute('select * from seat_allocation')
for row in c.fetchone():
print(row)
tree insert("", tk.END, values=row, text="ROOM NO")
c.close()
共有7栏ROOM NO,LINE NO,BENCH NO,REGISTRATION NO,PAPER CODE,EXAM DATE,INVIGILATOR NAME。表格seat_allocation的第一行的值分别为16,1,B2,16PJ,CORE-5,02-05-19,R.K.总行数为50。我一次显示一行(学生的信息)。
答案 0 :(得分:0)
我得到了答案,现在我想分享它,以便对任何人都有帮助。
33981 Juan Robles Garcia 5 1
33982 Lucas Robles Garcia 3 0
33983 Alba Robles Garcia 3 1