sorting many arrays from one...

Duncan Booth duncan at NOSPAMrcp.co.uk
Tue Jul 9 12:31:54 EDT 2002


"Shagshag13" <shagshag13 at yahoo.fr> wrote in
news:ager5l$ldguf$1 at ID-146704.news.dfncis.de: 

>  driven, *others = map(list, zip(*aux))
> 
> but this last line don't work and i don't know how to fix it... unless
> i replace it by : 
> 
> return map(list, zip(*aux))

You can get back driven and others by:

  others = map(list, zip(*aux))
  driven = others.pop()

but it all depends on what you want to do with the results. You might find 
it just as easy to do the return statement as (presumably) most of the time 
you call your generic function you know how many parameters you passed and 
therefore how many results to expect.


-- 
Duncan Booth                                             duncan at rcp.co.uk
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?



More information about the Python-list mailing list