The first code is a simple example:
from Tkinter import *
root = Tk()
c1 = Canvas(root, height = 180, width = 200, background = "black" )
c1.create_rectangle( 27, 17, 103, 93, fill = "blue", outline = "cyan")
c1.create_rectangle(103, 93, 179, 169, fill = "red", outline = "yellow")
c1.pack()
root.title("Rectangles")
root.mainloop()