list: from 2 to 3 dimensions..looking for a nice way

Sven salvadorindali at gmx.de
Sun Nov 30 03:48:20 CET 2003


> So why *do* you want a triply-nested list?
I got values from a db in this way -> [[id, date, value1, value2, 
value...],[id,date,value1,value2,value..],...]

I'd like to group the arrays if they have the same id and the date is 
nearby(+-1 sec) to one array(so that they stand for an order)->
[[[],[],[]],[[],[],[]]]

I don't mind if it would be these structure
{id:[[],[]],id:[[],[]]}
but in the end they should be sorted by date




More information about the Python-list mailing list