multidimentional tables with different types

Mathias Panzenboeck e0427417 at student.tuwien.ac.at
Sun Dec 10 14:17:57 EST 2006


vertigo wrote:
> Hello
> 
> I need to create structure which holds sorted records.
> Each record should have two fields:
> Float
> String
> 
> What type of structure will be the most appriopriate (simple) ?
> 
> Thanx

Just use a list. e.g.:

data = [(5.5,"foo"),(7.7,"bar")]

for a, b in data:
	print a, b

data.append((4.3,"egg"))
.
.
.



More information about the Python-list mailing list