input: Write a function to refactor the given Python code to make it more efficient. If the original code has a for loop that appends elements to a list based on a condition, rewrite the code using a list comprehension for better performance.
  assert refactor_code([1, 2, 3, 4])==[3, 4]
  assert refactor_code([5, 6, 7, 8])==[6, 7, 8]
  assert refactor_code([10, 20, 30, 40])==[20, 30, 40]
  assert refactor_code([1, 1, 1, 1])==[]
  assert refactor_code([2, 2, 3, 3])==[3, 3]
  assert refactor_code([])==[]
output: def refactor_code(lst):
      return [x for x in lst if x > 2]