example - pp \gui\intro\gui py--expansion from tkinter import label(text='hello gui world!'pack(expand=yesfill=bothmainloop(when widgets are packedwe can specify whether widget should expand to take up all available spaceand if sohow it should stretch to fill that space by defaultwidgets are not expanded when their parent is but in this scriptthe names yes and both (imported from the tkinter modulespecify that the label should grow along with its parentthe main window it does so in figure - figure - gui with widget resizing technicallythe packer geometry manager assigns size to each widget in display based on what it contains (text string lengthsetc by defaulta widget can occupy only its allocated space and is no bigger than its assigned size the expand and fill options let us be more specific about such things graphical user interfaces