http://phecoopwm6x7azx26ctuqcp6673bbqkrqfeoiz2wwk36sady5tqbdpqd.onion/posts/python/make-ascii-table.html
The strings in 'columns' will be used as the keys to the dicts in 'data.' """ # Calculate how wide each cell needs to be cell_widths = {} for c in columns : lens = [] values = [ lens . append ( len ( str ( d . get ( c , "" )))) for d in data ] lens . append ( len ( c )) lens . sort () cell_widths [ c ] = max ( lens ) # Used for formatting rows of data row_template = "|" + " {} |" * len ( columns ) # CONSTRUCT THE TABLE # The top row with the column titles justified_column_heads = [ c . ljust ( cell_widths...