input: Write a python function to sort a list based on a given order.
  assert sort_by_order([1, 3, 2, 4, 5], [5, 4, 3, 2, 1]) == [5, 4, 3, 2, 1]
  assert sort_by_order(['a', 'b', 'c'], ['b', 'c', 'a']) == ['b', 'c', 'a']
  assert sort_by_order([10, 20, 30], [30, 10, 20]) == [30, 10, 20]
output: def sort_by_order(lst, order):
      order_dict = {value: index for index, value in enumerate(order)}
      return sorted(lst, key=lambda x: order_dict[x])