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]]) == [1, 2, 3]
  assert flatten_2d_array([[1, 2], [3, 4], [5, 6]]) == [1, 2, 3, 4, 5, 6]
output: def flatten_2d_array(arr):
      return [item for sublist in arr for item in sublist]