Re: [Tutor] Sort a list following the order of other list

2005-08-22 Thread jfouhy
Quoting Jonas Melian <[EMAIL PROTECTED]>: > Thank you very much!. > > I didn't want to make it using the old-style programming because it's > more large and I'm supposed that slower that using a list comprehension > solution. Well, we can investigate, to find out the truth :-) Hopefully you ca

Re: [Tutor] Sort a list following the order of other list

2005-08-22 Thread Kent Johnson
Jonas Melian wrote: > best = [ [1024, 768], [800, 600], [640, 480] ] (it's larger) > > modes = [ > (24, [1280, 1024]), > (24, [1024, 768]), > (24, [640, 480]), > (16, [1600, 1200]), > (16, [1280, 1024]), > (15, [320, 200]), > ] > > I want to create a list with ALL elements of 'modes', but follow

Re: [Tutor] Sort a list following the order of other list

2005-08-22 Thread jfouhy
Quoting Jonas Melian <[EMAIL PROTECTED]>: > best = [ [1024, 768], [800, 600], [640, 480] ] (it's larger) > > modes = [ > (24, [1280, 1024]), > (24, [1024, 768]), > (24, [640, 480]), > (16, [1600, 1200]), > (16, [1280, 1024]), > (15, [320, 200]), > ] > > I want to create a list with ALL elements

[Tutor] Sort a list following the order of other list

2005-08-22 Thread Jonas Melian
best = [ [1024, 768], [800, 600], [640, 480] ] (it's larger) modes = [ (24, [1280, 1024]), (24, [1024, 768]), (24, [640, 480]), (16, [1600, 1200]), (16, [1280, 1024]), (15, [320, 200]), ] I want to create a list with ALL elements of 'modes', but following the order of list 'best' (if exist the