import tkinter
maze = [
[1,1,1,1,0,0,1,1,1,1,0,0,1,1,1,1,0,0,0,0],
[1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,0,0],
[1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,0,0],
[1,1,1,1,0,0,1,1,1,1,0,0,1,1,1,1,0,0,0,0],
[1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,0,0],
[1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,0,0],
[1,1,1,1,0,0,1,1,1,1,0,0,1,1,1,1,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
]
root = tkinter.Tk()
canvas = tkinter.Canvas(root, width=800, height=600, bg="white")
canvas.pack()
for y in range(len(maze)):
for x in range(len(maze[0])):
if maze[y][x] == 1:
canvas.create_rectangle(x*40, y*40, x*40+40, y*40+40, fill="grey")
root.mainloop()