def formatstring(cols, colwidth=_colwidth, spacing=_spacing):
 spacing *= ' '
 return spacing.join((c.center(colwidth) for c in cols))

def formatstring ( cols , colwidth = _colwidth , spacing = _spacing ) : spacing *= ' ' return spacing . join ( ( c . center ( colwidth ) for c in cols ) )
returns a string formatted from n strings .