input: Write a function to format a two-dimensional array as a table.
  
  def printTable(array):
      # find the longest string in each of the inner lists
      # so we can format the output
      col_width = [max(len(str(x)) for x in col) for col in array]
      for row in array:
          print("  ".join(str(x).ljust(col_width[i]) for i, x in enumerate(row)))
  
  assert printTable([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
  assert printTable([[10, 20, 30], [40, 50, 60], [70, 80, 90]])
  assert printTable([[100, 200, 300], [400, 500, 600], [700, 800, 900]])
  assert printTable([['a', 'bb', 'ccc'], ['dddd', 'ee', 'fff'], ['g', 'hhh', 'ii']])
  assert printTable([[]])
output: def printTable(array):
      if not array or not array[0]:
          return
      col_width = [max(len(str(x)) for x in col) for col in zip(*array)]
      for row in array:
          print("  ".join(str(x).ljust(col_width[i]) for i, x in enumerate(row)))