RE: sorting two corresponding lists?

2009-04-23 Thread Hans DushanthaKumar
Just being pedantic here :) [items[x] for x in [i for i in map(values.index, new_values)]] Is the same as [items[x] for x in map(values.index, new_values)] -Original Message- From: python-list-bounces+hans.dushanthakumar=hcn.com...@python.org [mailto:python-list-bounces+hans.dushantha

RE: best way to compare contents of 2 lists?

2009-04-23 Thread Hans DushanthaKumar
'set' comes to mind, though I'm not sure if there are performance inplications with large amopunts of data. >>> a=[1, 2, 3] >>> b=[2, 3, 1] >>> set(a) == set(b) True Cheers, Hans -Original Message- From: python-list-bounces+hans.dushanthakumar=hcn.com...@python.org [mailto:python-list-