input: Write a function to remove all occurrences of a given element in a given array.
  
  def remove_element(arr, element):
      arr = [x for x in arr if x != element]
      return arr
  
  assert remove_element([2, 4, 5, 7, 4, 2], 4) == [2, 5, 7, 2]
  assert remove_element([3, 5, 10, 1, 2], 2) == [3, 5, 10, 1]
  assert remove_element([4, 3, 1, 2], 5) == [4, 3, 1, 2]
  assert remove_element([3, 5, 4, 1, 2], 4) == [3, 5, 1, 2]
  assert remove_element([], 4) == []
output: def remove_element(arr, element):
      return [x for x in arr if x != element]