input: Write a function to remove all occurrences of the given element in the given array. The function should return the modified array after removing the specified element. If the given array is empty, the function should return an empty list.
  def remove_element(arr, element):
      return [x for x in arr if x != element]
  
  assert remove_element([2, 4, 5, 7, 4, 2], 4) == [2, 5, 7, 2]
  assert remove_element([1, 2, 3, 4, 5], 3) == [1, 2, 4, 5]
  assert remove_element([1, 1, 1, 1], 1) == []
  assert remove_element([], 4) == []
  assert remove_element([5, 6, 7, 8], 9) == [5, 6, 7, 8]
output: def remove_element(arr, element):
      return [x for x in arr if x != element]