List transormation

Dale Strickland-Clark dale at
Tue Sep 19 18:31:11 CEST 2000

Before I waste too much time on this, reinventing the wheel, is there a
quick way to reorder the items in a list under the control of another list?


x = ['kipper', 'my', 'a', 'nose', 'is']
y = [1, 3, 4, 2, 0]

y transforms the order of x to produce:

['my', 'nose', 'is', 'a', 'kipper']


Dale Strickland-Clark
Out-Think Ltd, UK
Business Technology Consultants

More information about the Python-list mailing list