input: Write a python function to flatten a 2D array.
  assert flatten_2d_array([[1,2,3], [4,5,6], [7,8,9]]) == [1,2,3,4,5,6,7,8,9]
  assert flatten_2d_array([[1,2], [3,4], [5,6]]) == [1,2,3,4,5,6]
  assert flatten_2d_array([[1], [2], [3]]) == [1,2,3]
output: def flatten_2d_array(array):
      return [element for sublist in array for element in sublist]