ent grid(row=rowcolumn= ent insert( 'grid'we'll leave further code compaction to the more serious sports fans in the audience (this code isn' too horrificbut making your code concise in general is not always in your coworkersbest interest!irrespective of coding tricksthe complexity of packing and gridding here seems similar as we'll see laterthoughgridding can require more code when widget resizing is factored into the mix combining grid and pack notice that the prior section' example - passes brand-new toplevel to each form constructor function so that the grid and pack versions wind up in distinct top-level windows because the two geometry managers are mutually exclusive within given parent containerwe have to be careful not to mix them improperly for instanceexample - is able to put both the packed and the gridded widgets on the same windowbut only by isolating each in its own frame container widget example - pp \gui\tour\grid\grid -same py ""build pack and grid forms on different frames in same windowcan' grid and pack in same parent container ( root windowbut can mix in same window if done in different parent frames""from tkinter import from grid import gridboxpackbox root tk(label(roottext='grid:'pack( tkinter tourpart