I have a csv file with a name the first column and either A or B in the second. I want to analyse this (what group their in) and put there names into the corresponding text box in tkinter, how would i go about this?
from tkinter import *
import csv
master=Tk()
file=open(file="Book1.csv")
f=csv.reader(file)
people=[]
for column in f:
people.append(column[0:2])
classAl=Label(master,text='A',width=10).grid(row=1,column=1)
classA=Text(master,width=10)
classA.grid(column=1,row=2)
classbl=Label(master,text='B',width=10).grid(row=1,column=2)
classB=Text(master,width=10)
classB.grid(column=2,row=2)
print(people)
grouplist=[x[1] for x in people]
for names in(grouplist):
print(names)
this is the coding i have so far, i can read what group they are in but i'm not sure on how to then put its corresponding name into the correct place. any help would be appreciated.