human
Sorting list based on values from another list?
assistant
Here is some code to sort list `X` based on values from another list `Y`

[x for y, x in sorted(zip(Y, X))]

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.