import visual for x in xr: for y in xr: for z in xr: X = (5-x) Y = (5-y) Z = (5-z) c.append(visual.box(pos=(X,Y,Z), size=(0.9,0.9,0.9)))