Q: string array (newbie)

darked at my-deja.com darked at my-deja.com
Mon Oct 30 13:44:25 EST 2000


Dear All,

I'm struggling with representation of an 12x8 array of strings.
My array looks like this:
"""
a01 a02 a03 a04 a05 a06 a07 a08 a09 a10 a11 a12
b01 b02 b03 b04 b05 b06 b07 b08 b09 b10 b11 b12
c01 c02 c03 c04 c05 c06 c07 c08 c09 c10 c11 c12
d01 d02 d03 d04 d05 d06 d07 d08 d09 d10 d11 d12
e01 e02 e03 e04 e05 e06 e07 e08 e09 e10 e11 e12
f01 f02 f03 f04 f05 f06 f07 f08 f09 f10 f11 f12
g01 g02 g03 g04 g05 g06 g07 g08 g09 g10 g11 g12
h01 h02 h03 h04 h05 h06 h07 h08 h09 h10 h11 h12
"""
Is there a better way to represent such data than by using a list of
strings (1) or list of lists (2)? What if such string array will be read
from a web form by a CGI script (POST)? Thanks a lot for your help

Greetings

Darek Kedra



Add 1:
A = "a01 a02 a03 a04 a05 a06 a07 a08 a09 a10 a11 a12"
my_array =[A, B, C, etc ]

Add 2:
A = ['a01', 'a02', .... 'a12']
my_array =[A, B, C, etc ]


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list