to both their packing order and their side attachment options when widgets are griddedthey are assigned row and column numbers instead none of this will become very meaningfulthoughuntil we have more than one widget in windowso let' move on notice that this version calls the pack method right away after creating the labelwithout assigning it variable if we don' need to save widgetwe can pack it in place like this to eliminate statement we'll use this form when widget is attached to larger structure and never again referenced this can be tricky if you assign the pack resultthoughbut 'll postpone an explanation of why until we've covered few more basics we also use tk widget class instanceinstead of noneas the parent here tk represents the main ("root"window of the program--the one that starts when the program does an automatically created tk instance is also used as the default parent widgetboth when we don' pass any parent to other widget calls and when we pass the parent as none in other wordswidgets are simply attached to the main program window by default this script just makes this default behavior explicit by making and passing the tk object itself in we'll see that toplevel widgets are typically used to generate new pop-up windows that operate independently of the program' main window in tkintersome widget methods are exported as functionsand this lets us shave example - to just three lines of code example - pp \gui\intro\gui py-- minimal version from tkinter import label(text='hello gui world!'pack(mainloop(the tkinter mainloop can be called with or without widget ( as function or methodwe didn' pass label parent argument in this versioneitherit simply defaults to none when omitted (which in turn defaults to the automatically created tk objectbut relying on that default is less useful once we start building larger displays things such as labels are more typically attached to other widget containers widget resizing basics top-level windowssuch as the one built by all of the coding variants we have seen thus farcan normally be resized by the usersimply drag out the window with your mouse figure - shows how our window looks when it is expanded this isn' very good--the label stays attached to the top of the parent window instead of staying in the middle on expansion--but it' easy to improve on this with pair of pack optionsdemonstrated in example - tkinter coding alternatives