The frame widgets group other Tk widgets and are the parent of most other widgets in Tk. They position and group multiple widgets and insert space into the GUI layout forming the basis for layout specifications. In this example, f is set to a toplevel frame.
Toplevel frames are stand-alone windows which have no parent.
The frame function creates the frames. In this case only one parameter is specified, side . By default, frames arrange other widgets from top to bottom, i.e. the default value for side is 'top' . By specifying 'left' here, the frame packs children widgets from left to right. A record is created and used to hold the other frames they are produced.