Arrays? (Or lists if you prefer)

Hakusa at gmail.com Hakusa at gmail.com
Mon Oct 23 08:43:57 CEST 2006


Niel Cerutti wrote:
>Just build it up bit by bit, or build it all at once
>using range() and then fill it in afterwards.

>    >>> b =[range(2), range(2)]
>    >>> b
>    [0, 1], [0, 1]]
>    >>> b[0][1] = "OK."
>    >>> b
>    [0, 'OK.'], [0, 1]]

Interesting. Could I do . . . let's say

b = [range(range(3)]

for a three-dimensional array?


Paul McGuire wrote:
> As an example of using pyparsing, I chose a simple text adventure
> application, and had to create a 2-D grid of rooms.  The presentation
> materials are online at http://www.python.org/pycon/2006/papers/4/, and the
> source code is included with the examples that ship with pyparsing

I read your entire thing, but how much stuck is a testimate to how much
I have yet to learn. Also, I didn't see the source code or downoad or
anything there. Where is it again?

Thanks for the responces.




More information about the Python-list mailing list