input: Write a function to format a two-dimensional array as a table. The function should print the array in a nicely aligned format with columns. 
  
  assert printTable([[1, 2, 3], [4, 5, 6], [7, 8, 9]])=="""
  1  2  3
  4  5  6
  7  8  9
  """.strip()
  assert printTable([[10, 20, 30], [4, 5, 6], [7, 8, 9]])=="""
  10  20  30
  4   5   6
  7   8   9
  """.strip()
  assert printTable([[1, 1, 1], [1, 1, 1], [1, 1, 1]])=="""
  1  1  1
  1  1  1
  1  1  1
  """.strip()
  assert printTable([[5], [5], [5]])=="""
  5
  5
  5
  """.strip()
  assert printTable([])="".strip()
output: def printTable(arr):
      if not arr:
          return ""
      col_widths = [max(len(str(item)) for item in col) for col in zip(*arr)]
      return "\n".join(" ".join(str(item).rjust(col_widths[i]) for i, item in enumerate(row)) for row in arr)