August 2018
Intermediate to advanced
366 pages
10h 14m
English
There are three problems we have to solve to implement our maketable function:
If we decompose our maketable function, the first thing it does is to split text longer than 20 characters into multiple lines:
[textwrap.wrap(col, COLSIZE) for col in cols]
That applied to each column leads us to having a list of columns, each containing a list of rows:
[['hello world'], ['this is a long text,', 'maybe longer than', 'expected, surely', 'long enough'], ['one more column']]
Then we need to ensure that each row shorter than 20 characters is extended to be exactly 20 characters, so that our ...