Tuple of coordinates
alex23
wuwei23 at gmail.com
Thu May 29 09:32:29 EDT 2008
On May 29, 10:16 pm, "victor.hera... at gmail.com"
<victor.hera... at gmail.com> 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)]
More information about the Python-list
mailing list