parameters: (table, max_width)
docstring: Print a simple nicely-aligned table.
  
      table must be a list of (equal-length) lists. Columns are space-separated,
      and as narrow as possible, but no wider than max_width. Text may overflow
      columns; note that unlike string.format, this will not affect subsequent
      columns, if possible.
docstring_summary: Print a simple nicely-aligned table.
docstring_tokens: Print a simple nicely - aligned table .
function: def print_table(table, max_width):
      """Print a simple nicely-aligned table.
  
      table must be a list of (equal-length) lists. Columns are space-separated,
      and as narrow as possible, but no wider than max_width. Text may overflow
      columns; note that unlike string.format, this will not affect subsequent
      columns, if possible."""
  
      max_widths = [max_width] * len(table[0])
      column_widths = [max(printed_len(row[j]) + 1 for row in table)
                       for j in range(len(table[0]))]
      column_widths = [min(w, max_w) for w, max_w in zip(column_widths, max_widths)]
  
      for row in table:
          row_str = ''
          right_col = 0
          for cell, width in zip(row, column_widths):
              right_col += width
              row_str += cell + ' '
              row_str += ' ' * max(right_col - printed_len(row_str), 0)
          print row_str
function_tokens: def print_table ( table , max_width ) : max_widths = [ max_width ] * len ( table [ 0 ] ) column_widths = [ max ( printed_len ( row [ j ] ) + 1 for row in table ) for j in range ( len ( table [ 0 ] ) ) ] column_widths = [ min ( w , max_w ) for w , max_w in zip ( column_widths , max_widths ) ] for row in table : row_str = '' right_col = 0 for cell , width in zip ( row , column_widths ) : right_col += width row_str += cell + ' ' row_str += ' ' * max ( right_col - printed_len ( row_str ) , 0 ) print row_str