Skip to main content
1 of 2
faysou
  • 11k
  • 3
  • 50
  • 131

How to order a list to match the order of another list?

How can I order a list to match the order of anoter list ?

For example if I have lists x = {3, 1, 5, 7} and y = {3, 7, 1, 5} how can I order x to have the order of y ?

This question is interesting if each element of x has composite values for example as a list or an association.

faysou
  • 11k
  • 3
  • 50
  • 131