Tuples part 2

victor.herasme at gmail.com victor.herasme at gmail.com
Wed Jun 4 17:57:05 EDT 2008


Hi Everyone,

i have another question. What if i wanted to make n tuples, each with
a list of coordinates. For example :


coords = list()
for h in xrange(1,11,1):
   for i in xrange(1, 5, 1) :
      for j in xrange(1, 5, 1) :
         for k in xrange(1,2,1) :
            coords.append((i,j,k))
            lista+str(h)= tuple coords
print tuple(coords)


so that i will have tuple1, tuple2,..., tupleN, etc. I am trying to do
it the way i show you above but it is not working properly. I wish you
could help me with that. Thanks again,



More information about the Python-list mailing list