from Tkinter import *
canvas = Canvas(width=600, height=600, bg='white')
canvas.pack(expand=YES, fill=BOTH)
def kare(y,d):
canvas.create_rectangle(10+y, 10+d, 60+y, 60+d, width=5, fill='red')
y=0
d=0
a=5
while a>0:
c=5
e=0
while c>0:
kare(y,d+e)
e=e+60
c=c-1
a=a-1
y=y+60
mainloop()