input: Write a function to remove all occurrences of a given element from 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([1, 2, 3, 4, 3, 2, 1], 2)==[1, 3, 4, 3, 1]
  assert remove_element([10, 20, 30, 20, 40], 20)==[10, 30, 40]
  assert remove_element([], 5)==[]
output: def remove_element(arr, element):
      arr = [x for x in arr if x != element]
      return arr