def equalize_array(array):
  """ Expand all rows of 2D array to the same length """
  if len(array) == 0:
    return array
  max_length = max([len(i) for i in array])
  for row in array:
    diff = max_length - len(row)
    row.extend([""] * diff)
  return array