button(text='quit'command=sys exitgrid(row=numrow+ column= mainloop(figure - shows this script at work summing up four columns of numbersto get different-size tablechange the numrow and numcol variables at the top of the script figure - adding column sums and finallyexample - is one last extension that is coded as class for reusabilityand it adds button to load the table' data from file data files are assumed to be coded as one line per rowwith whitespace (spaces or tabsbetween each column within row line loading file of data automatically resizes the table gui to accommodate the number of columns in the table based upon the file' content example - pp \gui\tour\grid\grid py recode as an embeddable class from tkinter import from tkinter filedialog import askopenfilename from pp gui tour quitter import quitter reusepackand grid class sumgrid(frame)def __init__(selfparent=nonenumrow= numcol= )frame __init__(selfparentself numrow numrow am frame container self numcol numcol caller packs or grids me self makewidgets(numrownumcolelse only usable one way def makewidgets(selfnumrownumcol)self rows [for in range(numrow)cols [for in range(numcol)ent entry(selfrelief=ridgeent grid(row= + column=jsticky=nsewent insert(end'% % (ij)cols append(entself rows append(colsgrids