I have a 3D array in Python and I need to iterate over all the cubes in the array. That is, for all (x,y,z) in the array\'s dimensions I need to access the cub
(x,y,z)
import itertools for x, y, z in itertools.product(xrange(x_size), xrange(y_size), xrange(z_size)): work_with_cube(array[x, y, z])