I have got this script on Python 2.6 with RHEL OS:
import csv
def write_cols(data):
col_spacer = \" \" # added between columns
widths = [0] * len
Your format call here:
"{{:<{width}}}".format(col, width=widths[index])
has either too many or not enough arguments / braces. The braces in the string each indicate a place to put text for format
. I'd say you have too many braces and it gets confused by that. You could either use different parenthesis, or remove them...
Tell me if i'm missing the point/purpose of this statement