def __init__(self, columns, contents, spacer=' | ', retain_newlines=True):
        '''
        "columns"   is a list of tuples (width in chars, alignment) where
                    alignment is one of LEFT, CENTER or RIGHT.
        "contents"  is a list of chunks of text to format into each of the
                    columns.
        '''
        assert len(columns) == len(contents), \
            'columns and contents must be same length'
        self.columns = columns
        self.num_columns = len(columns)
        self.contents = contents
        self.spacer = spacer
        self.retain_newlines = retain_newlines
        self.positions = [0]*self.num_columns

        "columns"   is a list of tuples (width in chars, alignment) where
                    alignment is one of LEFT, CENTER or RIGHT.
        "contents"  is a list of chunks of text to format into each of the
                    columns.
        
recipes/Python/302380_Formatting_platext/recipe-302380.py