Human: Sorting list based on values from another list? Assistant: 
Here is some code to sorting 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.