form frame(rootleft frame(formrite frame(formform pack(fill=xleft pack(side=leftrite pack(side=rightexpand=yesfill=xvariables [for field in fieldslab label(leftwidth= text=fieldent entry(ritelab pack(side=topent pack(side=topfill=xvar stringvar(ent config(textvariable=varvar set('enter here'variables append(varreturn variables make outer frame make two columns grow horizontal add to columns grow horizontal link field to var if __name__ ='__main__'root tk(vars makeform(rootfieldsbutton(roottext='fetch'command=(lambdafetch(vars))pack(side=leftquitter(rootpack(side=rightroot bind(''(lambda eventfetch(vars))root mainloop(except for the fact that this script initializes input fields with the string 'enter here'it makes window virtually identical in appearance and function to that created by the script entry (see figures - and - for illustration purposesthe window is laid out differently--as frame containing two nested subframes used to build the left and right columns of the form area--but the end result is the same when it is displayed on screen (for some guis on some platformsat leastsee the note at the end of this section for discussion of why layout by rows instead of columns is generally preferredthe main thing to notice herethoughis the use of stringvar variables instead of using list of entry widgets to fetch input valuesthis version keeps list of stringvar objects that have been associated with the entry widgetslike thisent entry(ritevar stringvar(ent config(textvariable=varlink field to var once you've tied variables in this waychanging and fetching the variable' valuevar set('text here'value var get(message and entry