input: Write a function to print a two-dimensional array as a table. The function should align the columns by the longest element in each column. If the array is empty, the function should print an empty line.
  assert printTable([[1, 2, 3], [4, 5, 6], [7, 8, 9]])==None
  assert printTable([[10, 20, 30, 40], [50, 60, 70, 80], [90, 100, 110, 120]])==None
  assert printTable([[1, 2, 3], [4, 5], [6]])==None
  assert printTable([])==None
output: def printTable(arr):
      if not arr:
          print()
          return
      
      num_rows = len(arr)
      num_cols = max(len(row) for row in arr)
      
      col_widths = [max(len(str(arr[row][col])) for row in range(num_rows) if col < len(arr[row])) for col in range(num_cols)]
      
      for row in arr:
          print(" ".join(str(row[col]).rjust(col_widths[col]) for col in range(len(row))))