You should store the items in some sort of data structure. You can then iterate over the structure to pick out specific values or iterate over all of the values.
For example, you might store them in a list:
rects = []
for y in range(2):
for x in range(2):
...
item = canvas.create_rectangle(...)
rects.append(item)
...
This allows you to easily iterate over all of the items:
for item in rects:
canvas.move(item, ...)
If keeping the x,y data is important, you can use the x,y as a key to a dictionary:
rects = {}
for y in range(2):
for x in range(2):
...
item = canvas.create_rectangle(...)
rects[(x,y)] = item
...
Then later, you do something like the following:
canvas.move(rects[(3,4)], ...)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…