On May 29, 10:16 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> i am using a software which uses python as its scripting language. I
> want to generate a list of coordinates more or less this way:
>
> for i in (beg, end, step):
>      for j in (beg, end, step):
>           for k in (beg, end, step):
> .........
>
> Coords =  ((i1,j1,k1), (i2,j2,k2), ...,(in,jn.kn))
>
> Can anyone give me some advice on how to achieve this ? I got a little
> idea, but still need to keep working til i get it. Thanks in advance,
>
> Victor

>>> coords = [(x,y,z) for x in range(0,10) for y in range(0,10) for z in 
>>> range(0,10)]

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to