View Single Post
  #3  
Old 04-25-2007, 12:21 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

Here is some code that creates an [X][Y][Z] dimensional list of Cone objects.
Code:
class Cone(object): pass

X = 5
Y = 3
Z = 2

cones = [ [ [ Cone() for z in xrange(Z) ] for y in xrange(Y) ] for x in xrange(X) ]
Hope this helps
Reply With Quote