A canvas is a rectangular Tkinter widget where a program can place shapes and other graphical objects. Shapes belong to the canvas, not directly to the window. A rectangle can be described by four coordinates: its top-left and bottom-right corners. section 38.2
Player pieces in a tag game
A tag game can place two colored rectangles on one canvas. Each rectangle gets a random position and size, so the pieces look different each time the program runs. section 38.2
Listing 38.1. Initializing a window and widgets
import tkinter
window = tkinter.Tk()
window.geometry("800x800")
window.title("Tag!")
canvas = tkinter.Canvas(window) #1
canvas.pack(expand=1, fill='both') #2
See how a Tkinter canvas is added to a window and expanded to fill it. section 38.2



