>From ESR's "Why python?" b = a.keys(); b.sort() Two statements, one line. Doesn't create an incidental copy the way sorted does but I'm not sure how much you like to jam on one line. Cheers, Aaron