[Tutor] How to store key->multiple values?

Kenneth Gomez kennethg at pd.jaring.my
Tue Dec 30 10:18:30 EST 2003


Hello,

I would like some advice on how to store data of these types :

Material Name		Young's Modulus	Poisson's Ratio		Density
Aluminum		200e5			.27			2700
Steel			200e9			.33			8020

I would like this to be in an array where I can access the first subscript 
and get the rest of the values.

I thought of using a dictionary but I found that dictionary only allows one 
value per key. Can I use lists instead? How do I create a multidimensional 
list or tuple? How would I insert the values into a multidimensional list?

I would really appreciate some advice.

Thank you.


Cheers,

Kenneth Gomez,
http://www.kgomez.com
'I didn't lose my mind, it's backed up on tape somewhere.'




More information about the Tutor mailing list